Skip to content

Commit

Permalink
phong SceneView now uses GeometryCs if found
Browse files Browse the repository at this point in the history
  • Loading branch information
ezequielmastrasso committed Sep 7, 2020
1 parent 3e8f31d commit 78bcd5f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions startup/gui/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def __createPhongShader() :
'''
in vec3 fragmentN;
in vec3 geometryP;
in vec3 geometryCs;
vec3 ADSLightModel(in vec3 normal, in vec3 pos){
vec3 lightPos = vec3(1.0, 0.5, 0.0);
vec3 lightAmbient = vec3(0.3, 0.3, 0.3);
Expand All @@ -88,6 +90,9 @@ def __createPhongShader() :
}
void main(){
vec3 colour = ADSLightModel(fragmentN, geometryP);
if (geometryCs != vec3(0.0, 0.0, 0.0)){
colour = colour * geometryCs;
}
gl_FragColor = vec4(colour, 1.0);
}
'''
Expand Down

0 comments on commit 78bcd5f

Please sign in to comment.