Skip to content

Commit d838e7d

Browse files
committed
more fixes
1 parent 6b0822c commit d838e7d

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

jme3-core/src/main/resources/Common/ShaderLib/module/pbrlighting/PBRLightingUtils.glsllib

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,9 @@
304304
surface.emission = vec3(0.0);
305305
surface.ao = vec3(1.0);
306306
surface.lightMapColor = vec3(0.0);
307-
surface.alpha = 1.0;
307+
surface.alpha = 1.0;
308308
surface.roughness = 1.0;
309309
surface.metallic = 0.0;
310-
surface.alpha = 1.0;
311310
surface.exposure = 1.0;
312311
surface.diffuseColor = vec3(1.0);
313312
surface.specularColor = vec3(0.04);
@@ -515,7 +514,7 @@
515514
void PBRLightingUtils_calculatePreLightingValues(inout PBRSurface surface){
516515
surface.frontFacing = gl_FrontFacing;
517516
surface.depth = gl_FragCoord.z;
518-
surface.NdotV = clamp(abs(dot(!surface.frontFacing ? -surface.normal : surface.normal, surface.viewDir)), 0.001, 1.0);
517+
surface.NdotV = clamp(abs(dot(surface.normal, surface.viewDir)), 0.001, 1.0);
519518

520519
#ifdef SPECGLOSSPIPELINE
521520
float maxSpecular = max(max(surface.specularColor.r, surface.specularColor.g), surface.specularColor.b);

jme3-effects/src/main/resources/Common/MatDefs/Post/Downsample.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ void main() {
2424
vec3 b = getColor(m_Texture, vec2(texCoord.x, texCoord.y + 2.0*y)).rgb;
2525
vec3 c = getColor(m_Texture, vec2(texCoord.x + 2.0*x, texCoord.y + 2.0*y)).rgb;
2626

27-
vec3 d = getColor(m_Texture, vec2(texCoord.x - 2*x, texCoord.y)).rgb;
27+
vec3 d = getColor(m_Texture, vec2(texCoord.x - 2.0*x, texCoord.y)).rgb;
2828
vec3 e = getColor(m_Texture, vec2(texCoord.x, texCoord.y)).rgb;
29-
vec3 f = getColor(m_Texture, vec2(texCoord.x + 2*x, texCoord.y)).rgb;
29+
vec3 f = getColor(m_Texture, vec2(texCoord.x + 2.0*x, texCoord.y)).rgb;
3030

3131
vec3 g = getColor(m_Texture, vec2(texCoord.x - 2.0*x, texCoord.y - 2.0*y)).rgb;
3232
vec3 h = getColor(m_Texture, vec2(texCoord.x, texCoord.y - 2.0*y)).rgb;

jme3-terrain/src/main/resources/Common/MatDefs/Terrain/Modular/PBRTerrainUtils.glsllib

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@
7979
float PBRTerrainUtils_getAlphaBlendFromChannel(int layer){
8080
float finalAlphaBlendForLayer = 0.0;
8181
vec4 alphaBlend = vec4(0.0);
82-
if(float(layer) <= 3.0){
82+
if(layer <= 3){
8383
alphaBlend = alphaBlend_0;
84-
}else if(float(layer) <= 7.0){
84+
}else if(layer <= 7){
8585
alphaBlend = alphaBlend_1;
86-
}else if(float(layer) <= 11.0){
86+
}else if(layer <= 11){
8787
alphaBlend = alphaBlend_2;
8888
}
8989
int texChannelForAlphaBlending = int(mod(float(layer), 4.0)); //pick the correct channel (r g b or a) based on the layer's index

0 commit comments

Comments
 (0)