Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Pitiot
CGoGN
Commits
bc2e1c32
Commit
bc2e1c32
authored
Jan 30, 2015
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set spherical harmonics resolution at ShaderRadiancePerVertex construction
parent
c32aa9d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
SCHNApps/Plugins/surface_radiance/src/surface_radiance.cpp
SCHNApps/Plugins/surface_radiance/src/surface_radiance.cpp
+1
-3
include/Utils/Shaders/shaderRadiancePerVertex.h
include/Utils/Shaders/shaderRadiancePerVertex.h
+2
-2
src/Utils/Shaders/shaderRadiancePerVertex.cpp
src/Utils/Shaders/shaderRadiancePerVertex.cpp
+6
-5
No files found.
SCHNApps/Plugins/surface_radiance/src/surface_radiance.cpp
View file @
bc2e1c32
...
...
@@ -260,11 +260,9 @@ MapHandlerGen* Surface_Radiance_Plugin::importFromFile(const QString& fileName)
mapParams
.
paramVBO
=
new
Utils
::
VBO
();
mapParams
.
paramVBO
->
updateData
(
mapParams
.
param
);
mapParams
.
radiancePerVertexShader
=
new
Utils
::
ShaderRadiancePerVertex
();
mapParams
.
radiancePerVertexShader
=
new
Utils
::
ShaderRadiancePerVertex
(
SH_TYPE
::
get_resolution
()
);
registerShader
(
mapParams
.
radiancePerVertexShader
);
mapParams
.
radiancePerVertexShader
->
compile
(
SH_TYPE
::
get_resolution
());
mapParams
.
radiancePerVertexShader
->
setAttributeRadiance
(
mapParams
.
paramVBO
,
mapParams
.
radianceTexture
,
GL_TEXTURE1
);
// compute map bounding box
...
...
include/Utils/Shaders/shaderRadiancePerVertex.h
View file @
bc2e1c32
...
...
@@ -62,11 +62,11 @@ protected:
static
int
index
(
int
l
,
int
m
)
{
return
l
*
(
l
+
1
)
+
m
;
}
// compute indices in K_tab
public:
ShaderRadiancePerVertex
();
ShaderRadiancePerVertex
(
int
resolution
);
~
ShaderRadiancePerVertex
()
;
void
compile
(
int
resolution
);
void
compile
();
void
setCamera
(
Geom
::
Vec3f
camera
)
;
...
...
src/Utils/Shaders/shaderRadiancePerVertex.cpp
View file @
bc2e1c32
...
...
@@ -34,15 +34,17 @@ namespace Utils
#include "shaderRadiancePerVertex.geom"
#include "shaderRadiancePerVertex.frag"
ShaderRadiancePerVertex
::
ShaderRadiancePerVertex
()
:
ShaderRadiancePerVertex
::
ShaderRadiancePerVertex
(
int
resolution
)
:
m_vboPos
(
NULL
),
m_vboNorm
(
NULL
),
m_vboParam
(
NULL
),
m_tex_ptr
(
NULL
),
m_tex_unit
(
-
1
),
m_resolution
(
-
1
),
m_resolution
(
resolution
),
K_tab
(
NULL
)
{}
{
compile
();
}
ShaderRadiancePerVertex
::~
ShaderRadiancePerVertex
()
{
...
...
@@ -50,13 +52,12 @@ ShaderRadiancePerVertex::~ShaderRadiancePerVertex()
delete
[]
K_tab
;
}
void
ShaderRadiancePerVertex
::
compile
(
int
resolution
)
void
ShaderRadiancePerVertex
::
compile
()
{
m_nameVS
=
"ShaderRadiancePerVertex_vs"
;
m_nameFS
=
"ShaderRadiancePerVertex_fs"
;
m_nameGS
=
"ShaderRadiancePerVertex_gs"
;
m_resolution
=
resolution
;
const
int
nb_coefs
=
(
m_resolution
+
1
)
*
(
m_resolution
+
1
);
if
(
m_resolution
!=
-
1
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment