Skip to content

Commit

Permalink
Temporarily disable cubemap part of frag shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
ousnius committed Dec 24, 2016
1 parent f250115 commit a72dabc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
30 changes: 15 additions & 15 deletions res/shaders/default.frag
Original file line number Diff line number Diff line change
Expand Up @@ -177,21 +177,21 @@ void directionalLight(in DirectionalLight light, in vec3 inNormal, inout vec3 di

if (bCubemap)
{
vec3 reflected = mat3(inverse(matModelView)) * reflect(lightDir, normal);
vec4 cubeMap = texture(texCubemap, reflected);
cubeMap.rgb *= prop.envReflection;

if (bEnvMask)
{
cubeMap.rgb *= envMask.r;
}
else
{
// No env mask, use specular factor (0.0 if no normal map either)
cubeMap.rgb *= specFactor;
}

cube += cubeMap.rgb;
//vec3 reflected = mat3(inverse(matModelView)) * reflect(lightDir, normal);
//vec4 cubeMap = texture(texCubemap, reflected);
//cubeMap.rgb *= prop.envReflection;
//
//if (bEnvMask)
//{
// cubeMap.rgb *= envMask.r;
//}
//else
//{
// // No env mask, use specular factor (0.0 if no normal map either)
// cubeMap.rgb *= specFactor;
//}
//
//cube += cubeMap.rgb;
}
}

Expand Down
30 changes: 15 additions & 15 deletions res/shaders/fo4_default.frag
Original file line number Diff line number Diff line change
Expand Up @@ -179,21 +179,21 @@ void directionalLight(in DirectionalLight light, in vec3 inNormal, inout vec3 di

if (bCubemap)
{
vec3 reflected = mat3(inverse(matModelView)) * reflect(lightDir, normal);
vec4 cubeMap = texture(texCubemap, reflected);
cubeMap.rgb *= prop.envReflection;

if (bEnvMask)
{
cubeMap.rgb *= envMask.r;
}
else
{
// No env mask, use specular factor (0.0 if no normal map either)
cubeMap.rgb *= specFactor;
}

cube += cubeMap.rgb;
//vec3 reflected = mat3(inverse(matModelView)) * reflect(lightDir, normal);
//vec4 cubeMap = texture(texCubemap, reflected);
//cubeMap.rgb *= prop.envReflection;
//
//if (bEnvMask)
//{
// cubeMap.rgb *= envMask.r;
//}
//else
//{
// // No env mask, use specular factor (0.0 if no normal map either)
// cubeMap.rgb *= specFactor;
//}
//
//cube += cubeMap.rgb;
}
}

Expand Down

0 comments on commit a72dabc

Please sign in to comment.