Skip to content

Commit

Permalink
Merge branch 'pbr' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
create3000 committed Sep 29, 2023
2 parents 76d856b + 04bdf75 commit f2bf6bd
Show file tree
Hide file tree
Showing 69 changed files with 1,317 additions and 811 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"cSpell.words": [
"ammojs",
"bbox",
"BDRF",
"Catmull",
"dicom",
"fract",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/shaders/webgl1/Default1.vs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ precision highp int;
precision highp sampler2D;
precision highp samplerCube;
#pragma X3D include "include/Vertex.glsl"
#pragma X3D include "common/Vertex.glsl"
void
main ()
Expand Down
4 changes: 2 additions & 2 deletions src/assets/shaders/webgl1/Depth1.fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ precision highp sampler2D;
varying vec3 vertex;
#pragma X3D include "include/ClipPlanes.glsl"
#pragma X3D include "include/Point.glsl"
#pragma X3D include "common/ClipPlanes.glsl"
#pragma X3D include "common/Point.glsl"
void
main ()
Expand Down
2 changes: 1 addition & 1 deletion src/assets/shaders/webgl1/Depth1.vs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ attribute vec4 x3d_Vertex;
varying vec3 vertex;
#pragma X3D include "include/PointSize.glsl"
#pragma X3D include "common/PointSize.glsl"
void
main ()
Expand Down
2 changes: 1 addition & 1 deletion src/assets/shaders/webgl1/Gouraud1.fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ precision highp int;
precision highp sampler2D;
precision highp samplerCube;
#pragma X3D include "include/Fragment.glsl"
#pragma X3D include "common/Fragment.glsl"
varying vec4 frontColor;
Expand Down
10 changes: 5 additions & 5 deletions src/assets/shaders/webgl1/Gouraud1.vs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ precision highp int;
precision highp sampler2D;
precision highp samplerCube;
#pragma X3D include "include/Vertex.glsl"
#pragma X3D include "include/Material.glsl"
#pragma X3D include "common/Vertex.glsl"
#pragma X3D include "common/Material.glsl"
varying vec4 frontColor;
Expand All @@ -22,10 +22,10 @@ getMaterialColor (const in vec3 N,
float alpha = 1.0 - x3d_Material .transparency;
vec4 diffuseParameter = vec4 (x3d_Material .diffuseColor, alpha);
#if defined (X3D_COLOR_MATERIAL)
vec4 diffuseParameter = vec4 (color .rgb, color .a * alpha);
#else
vec4 diffuseParameter = vec4 (x3d_Material .diffuseColor, alpha);
diffuseParameter *= color;
#endif
// Get material color.
Expand Down
Loading

0 comments on commit f2bf6bd

Please sign in to comment.