linux followup work by tim

This commit is contained in:
AzaezelX 2019-08-21 03:12:54 -05:00
parent 9fe9389ae5
commit f1282a9cbc
26 changed files with 6646 additions and 5681 deletions

View file

@ -24,6 +24,7 @@
in vec4 hpos;
in vec2 uv0;
#line 27
uniform samplerCube environmentMap;
@ -123,8 +124,7 @@ vec4 prefilterEnvMap(vec3 R)
out vec4 OUT_col;
void main()
{
{
vec3 N = getCubeDir(face, uv0);
OUT_col = prefilterEnvMap(N);
}

View file

@ -1,5 +1,5 @@
#include "../../../gl/hlslCompat.glsl"
#include "../../../postFx/gl/postFx.glsl"
#include "../../../postFX/gl/postFx.glsl"
#include "../../../gl/torque.glsl"
#include "shadergen:/autogenConditioners.h"
#include "../../../gl/lighting.glsl"
@ -55,6 +55,7 @@ void main()
float alpha = 1;
#ifdef SKYLIGHT_ONLY
#if SKYLIGHT_ONLY == 0
int i = 0;
float blendFactor[MAX_PROBES];
@ -154,6 +155,7 @@ void main()
#endif
//}
#endif
#endif //SKYLIGHT_ONLY
vec3 irradiance = vec3(0, 0, 0);
vec3 specular = vec3(0, 0, 0);
@ -165,6 +167,7 @@ void main()
float lod = 0;
#endif
#ifdef SKYLIGHT_ONLY
#if SKYLIGHT_ONLY == 0
alpha = 1;
for (i = 0; i < numProbes; ++i)
@ -172,7 +175,7 @@ void main()
float contrib = contribution[i];
if (contrib != 0)
{
int cubemapIdx = probeConfigData[i].a;
float cubemapIdx = probeConfigData[i].a;
vec3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], bbMinArray[i].xyz, bbMaxArray[i].xyz, inRefPosArray[i].xyz);
irradiance += textureLod(irradianceCubemapAR, vec4(dir, cubemapIdx), 0).xyz * contrib;
@ -181,6 +184,7 @@ void main()
}
}
#endif
#endif //SKYLIGHT_ONLY
if (skylightCubemapIdx != -1 && alpha > 0.001)
{