Skip to content
Snippets Groups Projects
Commit c66a1aa9 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Whitespace cleanup

parent a91aec30
No related branches found
No related tags found
No related merge requests found
...@@ -40,4 +40,10 @@ mat4 getSkinnedTransform() ...@@ -40,4 +40,10 @@ mat4 getSkinnedTransform()
ret[3] = vec4(0,0,0,1); ret[3] = vec4(0,0,0,1);
return ret; return ret;
#ifdef IS_AMD_CARD
// If it's AMD make sure the GLSL compiler sees the arrays referenced once by static index. Otherwise it seems to optimise the storage awawy which leads to unfun crashes and artifacts.
vec4 dummy1 = matrixPalette[0];
vec4 dummy2 = matrixPalette[44];
#endif
} }
...@@ -61,5 +61,12 @@ mat4 getObjectSkinnedTransform() ...@@ -61,5 +61,12 @@ mat4 getObjectSkinnedTransform()
ret[3] = vec4(trans, 1.0); ret[3] = vec4(trans, 1.0);
return ret; return ret;
#ifdef IS_AMD_CARD
// If it's AMD make sure the GLSL compiler sees the arrays referenced once by static index. Otherwise it seems to optimise the storage awawy which leads to unfun crashes and artifacts.
mat3x4 dummy1 = matrixPalette[0];
mat3x4 dummy2 = matrixPalette[MAX_JOINTS_PER_MESH_OBJECT-1];
#endif
} }
...@@ -110,5 +110,11 @@ void main() ...@@ -110,5 +110,11 @@ void main()
//col.y *= col.y; //col.y *= col.y;
frag_color = max(col, vec4(0)); frag_color = max(col, vec4(0));
#ifdef IS_AMD_CARD
// If it's AMD make sure the GLSL compiler sees the arrays referenced once by static index. Otherwise it seems to optimise the storage awawy which leads to unfun crashes and artifacts.
vec3 dummy1 = kern[0];
vec3 dummy2 = kern[3];
#endif
} }
...@@ -382,14 +382,14 @@ vec3 pbrIbl(vec3 diffuseColor, ...@@ -382,14 +382,14 @@ vec3 pbrIbl(vec3 diffuseColor,
{ {
// retrieve a scale and bias to F0. See [1], Figure 3 // retrieve a scale and bias to F0. See [1], Figure 3
vec2 brdf = BRDF(clamp(nv, 0, 1), 1.0-perceptualRough); vec2 brdf = BRDF(clamp(nv, 0, 1), 1.0-perceptualRough);
vec3 diffuseLight = irradiance; vec3 diffuseLight = irradiance;
vec3 specularLight = radiance; vec3 specularLight = radiance;
vec3 diffuse = diffuseLight * diffuseColor; vec3 diffuse = diffuseLight * diffuseColor;
vec3 specular = specularLight * (specularColor * brdf.x + brdf.y); vec3 specular = specularLight * (specularColor * brdf.x + brdf.y);
specular *= computeSpecularAO(nv, ao, perceptualRough * perceptualRough); specular *= computeSpecularAO(nv, ao, perceptualRough * perceptualRough);
return (diffuse * ao) + specular; return (diffuse * ao) + specular;
} }
......
...@@ -51,7 +51,6 @@ void main() ...@@ -51,7 +51,6 @@ void main()
vec4 norm = texture(normalMap, tc); vec4 norm = texture(normalMap, tc);
//!GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_HDRI) && //!GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_HDRI) &&
if (!GET_GBUFFER_FLAG(GBUFFER_FLAG_SKIP_ATMOS)) if (!GET_GBUFFER_FLAG(GBUFFER_FLAG_SKIP_ATMOS))
{ {
......
...@@ -169,4 +169,13 @@ void main() ...@@ -169,4 +169,13 @@ void main()
frag_color.rgb = max(final_color, vec3(0)); frag_color.rgb = max(final_color, vec3(0));
frag_color.a = 0.0; frag_color.a = 0.0;
#ifdef IS_AMD_CARD
// If it's AMD make sure the GLSL compiler sees the arrays referenced once by static index. Otherwise it seems to optimise the storage
// away which leads to unfun crashes and artifacts.
vec4 dummy1 = light[0];
vec4 dummy2 = light_col[0];
vec4 dummy3 = light[LIGHT_COUNT - 1];
vec4 dummy4 = light_col[LIGHT_COUNT - 1];
#endif
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment