Batch indexing/no-fixed-function WIP.
This commit is contained in:
@@ -9546,17 +9546,28 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderDebugPipeline</key>
|
||||
<key>RenderDebugPipeline</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable strict pipeline debugging.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderMaxTextureIndex</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Maximum texture index to use for indexed texture rendering.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>6</integer>
|
||||
</map>
|
||||
<key>RenderDebugTextureBind</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -9859,6 +9870,18 @@
|
||||
<key>Value</key>
|
||||
<real>0</real>
|
||||
</map>
|
||||
|
||||
<key>RenderDepthOfField</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to use depth of field effect when lighting and shadows are enabled</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
<key>RenderSpotLightsInNondeferred</key>
|
||||
<map>
|
||||
@@ -9881,7 +9904,7 @@
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>0.0</real>
|
||||
<real>-0.001</real>
|
||||
</map>
|
||||
<key>RenderSpotShadowOffset</key>
|
||||
<map>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
void default_lighting();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
attribute vec4 weight; //1
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
|
||||
mat4 getSkinnedTransform();
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
void default_lighting();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol);
|
||||
void calcAtmospherics(vec3 inPositionEye);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
attribute vec4 object_weight;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
mat4 getSkinnedTransform();
|
||||
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
/**
|
||||
* @file alphaF.glsl
|
||||
*
|
||||
* Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
uniform sampler2DRect depthMap;
|
||||
|
||||
vec4 diffuseLookup(vec2 texcoord);
|
||||
|
||||
uniform mat4 shadow_matrix[6];
|
||||
uniform vec4 shadow_clip;
|
||||
uniform vec2 screen_res;
|
||||
@@ -47,7 +48,7 @@ void main()
|
||||
|
||||
vec4 pos = vec4(vary_position, 1.0);
|
||||
|
||||
vec4 diff= texture2D(diffuseMap, gl_TexCoord[0].xy);
|
||||
vec4 diff= diffuseLookup(gl_TexCoord[0].xy);
|
||||
|
||||
vec4 col = vec4(vary_ambient + vary_directional.rgb, gl_Color.a);
|
||||
vec4 color = diff * col;
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* @file alphaF.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
uniform sampler2DRect depthMap;
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
|
||||
uniform mat4 shadow_matrix[6];
|
||||
uniform vec4 shadow_clip;
|
||||
uniform vec2 screen_res;
|
||||
|
||||
vec3 atmosLighting(vec3 light);
|
||||
vec3 scaleSoftClip(vec3 light);
|
||||
|
||||
varying vec3 vary_ambient;
|
||||
varying vec3 vary_directional;
|
||||
varying vec3 vary_fragcoord;
|
||||
varying vec3 vary_position;
|
||||
varying vec3 vary_pointlight_col;
|
||||
|
||||
uniform mat4 inv_proj;
|
||||
|
||||
vec4 getPosition(vec2 pos_screen)
|
||||
{
|
||||
float depth = texture2DRect(depthMap, pos_screen.xy).a;
|
||||
vec2 sc = pos_screen.xy*2.0;
|
||||
sc /= screen_res;
|
||||
sc -= vec2(1.0,1.0);
|
||||
vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
|
||||
vec4 pos = inv_proj * ndc;
|
||||
pos /= pos.w;
|
||||
pos.w = 1.0;
|
||||
return pos;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5;
|
||||
frag *= screen_res;
|
||||
|
||||
vec4 pos = vec4(vary_position, 1.0);
|
||||
|
||||
vec4 diff= texture2D(diffuseMap,gl_TexCoord[0].xy);
|
||||
|
||||
vec4 col = vec4(vary_ambient + vary_directional.rgb, gl_Color.a);
|
||||
vec4 color = diff * col;
|
||||
|
||||
color.rgb = atmosLighting(color.rgb);
|
||||
|
||||
color.rgb = scaleSoftClip(color.rgb);
|
||||
|
||||
color.rgb += diff.rgb * vary_pointlight_col.rgb;
|
||||
|
||||
gl_FragColor = color;
|
||||
//gl_FragColor = vec4(1,0,1,1);
|
||||
//gl_FragColor = vec4(1,0,1,1)*shadow;
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
|
||||
mat4 getObjectSkinnedTransform();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
|
||||
void calcAtmospherics(vec3 inPositionEye);
|
||||
@@ -23,6 +23,7 @@ varying vec3 vary_fragcoord;
|
||||
varying vec3 vary_position;
|
||||
varying vec3 vary_light;
|
||||
varying vec3 vary_pointlight_col;
|
||||
varying float vary_texture_index;
|
||||
|
||||
uniform float near_clip;
|
||||
uniform float shadow_offset;
|
||||
@@ -35,20 +36,25 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa
|
||||
|
||||
//get distance
|
||||
float d = length(lv);
|
||||
|
||||
//normalize light vector
|
||||
lv *= 1.0/d;
|
||||
|
||||
//distance attenuation
|
||||
float dist2 = d*d/(la*la);
|
||||
float da = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 0.0, 1.0);
|
||||
|
||||
// spotlight coefficient.
|
||||
float spot = max(dot(-ln, lv), is_pointlight);
|
||||
da *= spot*spot; // GL_SPOT_EXPONENT=2
|
||||
|
||||
//angular attenuation
|
||||
da *= calcDirectionalLight(n, lv);
|
||||
float da = 0.0;
|
||||
|
||||
if (d > 0.0 && la > 0.0 && fa > 0.0)
|
||||
{
|
||||
//normalize light vector
|
||||
lv *= 1.0/d;
|
||||
|
||||
//distance attenuation
|
||||
float dist2 = d*d/(la*la);
|
||||
da = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 0.0, 1.0);
|
||||
|
||||
// spotlight coefficient.
|
||||
float spot = max(dot(-ln, lv), is_pointlight);
|
||||
da *= spot*spot; // GL_SPOT_EXPONENT=2
|
||||
|
||||
//angular attenuation
|
||||
da *= calcDirectionalLight(n, lv);
|
||||
}
|
||||
|
||||
return da;
|
||||
}
|
||||
@@ -56,34 +62,35 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa
|
||||
void main()
|
||||
{
|
||||
//transform vertex
|
||||
gl_Position = ftransform();
|
||||
vec4 vert = vec4(gl_Vertex.xyz, 1.0);
|
||||
vary_texture_index = gl_Vertex.w;
|
||||
gl_Position = gl_ModelViewProjectionMatrix * vert;
|
||||
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
|
||||
vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
|
||||
vec4 pos = (gl_ModelViewMatrix * vert);
|
||||
vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
|
||||
|
||||
float dp_directional_light = max(0.0, dot(norm, gl_LightSource[0].position.xyz));
|
||||
vary_position = pos.xyz + gl_LightSource[0].position.xyz * (1.0-dp_directional_light)*shadow_offset;
|
||||
|
||||
|
||||
calcAtmospherics(pos.xyz);
|
||||
|
||||
//vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0.));
|
||||
|
||||
vec4 col = vec4(0.0, 0.0, 0.0, gl_Color.a);
|
||||
|
||||
// Collect normal lights
|
||||
col.rgb += gl_LightSource[2].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].quadraticAttenuation, gl_LightSource[2].specular.a);
|
||||
col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation, gl_LightSource[3].specular.a);
|
||||
col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation ,gl_LightSource[3].specular.a);
|
||||
col.rgb += gl_LightSource[4].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].quadraticAttenuation, gl_LightSource[4].specular.a);
|
||||
col.rgb += gl_LightSource[5].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[5].position, gl_LightSource[5].spotDirection.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].quadraticAttenuation, gl_LightSource[5].specular.a);
|
||||
col.rgb += gl_LightSource[6].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[6].position, gl_LightSource[6].spotDirection.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].quadraticAttenuation, gl_LightSource[6].specular.a);
|
||||
col.rgb += gl_LightSource[7].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[7].position, gl_LightSource[7].spotDirection.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].quadraticAttenuation, gl_LightSource[7].specular.a);
|
||||
|
||||
|
||||
vary_pointlight_col = col.rgb*gl_Color.rgb;
|
||||
|
||||
|
||||
col.rgb = vec3(0,0,0);
|
||||
|
||||
|
||||
// Add windlight lights
|
||||
col.rgb = atmosAmbient(vec3(0.));
|
||||
|
||||
@@ -98,7 +105,7 @@ void main()
|
||||
|
||||
gl_FogFragCoord = pos.z;
|
||||
|
||||
pos = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
pos = gl_ModelViewProjectionMatrix * vert;
|
||||
vary_fragcoord.xyz = pos.xyz + vec3(0,0,near_clip);
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
mat4 getObjectSkinnedTransform();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
|
||||
mat4 getSkinnedTransform();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
mat4 getSkinnedTransform();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
mat4 getSkinnedTransform();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
varying vec2 vary_fragcoord;
|
||||
uniform vec2 screen_res;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
uniform sampler2D bumpMap;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
varying vec3 vary_mat0;
|
||||
varying vec3 vary_mat1;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
varying vec3 vary_mat0;
|
||||
varying vec3 vary_mat1;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @file diffuseIndexedF.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
varying vec3 vary_normal;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 col = gl_Color.rgb * diffuseLookup(gl_TexCoord[0].xy).rgb;
|
||||
|
||||
gl_FragData[0] = vec4(col, 0.0);
|
||||
gl_FragData[1] = gl_Color.aaaa; // spec
|
||||
//gl_FragData[1] = vec4(vec3(gl_Color.a), gl_Color.a+(1.0-gl_Color.a)*gl_Color.a); // spec - from former class3 - maybe better, but not so well tested
|
||||
vec3 nvn = normalize(vary_normal);
|
||||
gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
varying vec3 vary_normal;
|
||||
|
||||
|
||||
@@ -5,16 +5,18 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
varying vec3 vary_normal;
|
||||
varying float vary_texture_index;
|
||||
|
||||
void main()
|
||||
{
|
||||
//transform vertex
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
gl_Position = gl_ModelViewProjectionMatrix * vec4(gl_Vertex.xyz, 1.0);
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
|
||||
vary_texture_index = gl_Vertex.w;
|
||||
vary_normal = normalize(gl_NormalMatrix * gl_Normal);
|
||||
|
||||
gl_FrontColor = gl_Color;
|
||||
|
||||
@@ -5,60 +5,24 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
uniform sampler2DRect depthMap;
|
||||
uniform sampler2D noiseMap;
|
||||
|
||||
uniform vec4 shadow_clip;
|
||||
uniform vec2 screen_res;
|
||||
|
||||
vec3 fullbrightAtmosTransport(vec3 light);
|
||||
vec3 fullbrightScaleSoftClip(vec3 light);
|
||||
|
||||
varying vec3 vary_ambient;
|
||||
varying vec3 vary_directional;
|
||||
varying vec4 vary_position;
|
||||
varying vec3 vary_normal;
|
||||
varying vec3 vary_fragcoord;
|
||||
|
||||
uniform mat4 inv_proj;
|
||||
|
||||
vec4 getPosition(vec2 pos_screen)
|
||||
{
|
||||
float depth = texture2DRect(depthMap, pos_screen.xy).a;
|
||||
vec2 sc = pos_screen.xy*2.0;
|
||||
sc /= screen_res;
|
||||
sc -= vec2(1.0,1.0);
|
||||
vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
|
||||
vec4 pos = inv_proj * ndc;
|
||||
pos /= pos.w;
|
||||
pos.w = 1.0;
|
||||
return pos;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5;
|
||||
frag *= screen_res;
|
||||
|
||||
vec3 samp_pos = getPosition(frag).xyz;
|
||||
|
||||
float shadow = 1.0;
|
||||
vec4 pos = vary_position;
|
||||
|
||||
vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy)*gl_Color;
|
||||
vec4 color = diffuseLookup(gl_TexCoord[0].xy)*gl_Color;
|
||||
|
||||
color.rgb = fullbrightAtmosTransport(color.rgb);
|
||||
|
||||
color.rgb = fullbrightScaleSoftClip(color.rgb);
|
||||
|
||||
//gl_FragColor = gl_Color;
|
||||
gl_FragColor = color;
|
||||
//gl_FragColor = vec4(1,0,1,1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void calcAtmospherics(vec3 inPositionEye);
|
||||
|
||||
@@ -14,30 +14,23 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
|
||||
vec3 scaleDownLight(vec3 light);
|
||||
vec3 scaleUpLight(vec3 light);
|
||||
|
||||
varying vec3 vary_ambient;
|
||||
varying vec3 vary_directional;
|
||||
varying vec3 vary_normal;
|
||||
varying vec3 vary_fragcoord;
|
||||
uniform float near_clip;
|
||||
varying vec4 vary_position;
|
||||
varying float vary_texture_index;
|
||||
|
||||
void main()
|
||||
{
|
||||
//transform vertex
|
||||
gl_Position = ftransform();
|
||||
vec4 vert = vec4(gl_Vertex.xyz, 1.0);
|
||||
vary_texture_index = gl_Vertex.w;
|
||||
|
||||
gl_Position = gl_ModelViewProjectionMatrix*vert;
|
||||
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
|
||||
vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
|
||||
vary_position = pos;
|
||||
|
||||
vec4 pos = (gl_ModelViewMatrix * vert);
|
||||
|
||||
calcAtmospherics(pos.xyz);
|
||||
|
||||
gl_FrontColor = gl_Color;
|
||||
|
||||
gl_FogFragCoord = pos.z;
|
||||
|
||||
pos = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
vary_fragcoord.xyz = pos.xyz + vec3(0,0,near_clip);
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
varying vec2 vary_fragcoord;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
uniform sampler2D normalMap;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2DRect diffuseMap;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
|
||||
varying vec2 vary_fragcoord;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
varying vec4 vary_fragcoord;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
//class 1 -- no shadows
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
|
||||
@@ -5,19 +5,14 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
varying vec4 vary_light;
|
||||
varying vec4 vary_fragcoord;
|
||||
|
||||
uniform vec2 screen_res;
|
||||
uniform float near_clip;
|
||||
|
||||
void main()
|
||||
{
|
||||
//transform vertex
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
|
||||
vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
vary_fragcoord = pos;
|
||||
|
||||
@@ -25,6 +20,8 @@ void main()
|
||||
tex.w = 1.0;
|
||||
|
||||
vary_light = gl_MultiTexCoord0;
|
||||
|
||||
gl_Position = pos;
|
||||
|
||||
gl_FrontColor = gl_Color;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
varying vec2 vary_fragcoord;
|
||||
uniform vec2 screen_res;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2DRect depthMap;
|
||||
uniform sampler2DRect normalMap;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
varying vec2 vary_fragcoord;
|
||||
uniform vec2 screen_res;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
varying vec4 post_pos;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform vec2 screen_res;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
//class 1, no shadow, no SSAO, should never be called
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
@@ -35,7 +35,7 @@ uniform float shadow_offset;
|
||||
|
||||
vec4 getPosition(vec2 pos_screen)
|
||||
{
|
||||
float depth = texture2DRect(depthMap, pos_screen.xy).a;
|
||||
float depth = texture2DRect(depthMap, pos_screen.xy).r;
|
||||
vec2 sc = pos_screen.xy*2.0;
|
||||
sc /= screen_res;
|
||||
sc -= vec2(1.0,1.0);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
varying vec4 vary_light;
|
||||
varying vec2 vary_fragcoord;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D detail_0;
|
||||
uniform sampler2D detail_1;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
varying vec3 vary_normal;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
varying vec3 vary_normal;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void calcAtmospherics(vec3 inPositionEye);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
uniform float glowStrength;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform vec2 glowDelta;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D detail0;
|
||||
uniform sampler2D detail1;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
// this class1 shader is just a copy of terrainF
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
uniform sampler2D bumpMap;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
vec3 scaleSoftClip(vec3 inColor);
|
||||
vec3 atmosTransport(vec3 inColor);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
vec4 applyWaterFog(vec4 color)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void calcAtmospherics(vec3 inPositionEye);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
uniform samplerCube environmentMap;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
float calcDirectionalLight(vec3 n, vec3 l)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
|
||||
float calcDirectionalLight(vec3 n, vec3 l)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
float calcDirectionalLight(vec3 n, vec3 l);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
float calcDirectionalLight(vec3 n, vec3 l);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3 l, vec3 lightCol, float da);
|
||||
vec3 atmosAmbient(vec3 light);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
float calcDirectionalLight(vec3 n, vec3 l);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void fullbright_lighting();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void fullbright_shiny_lighting();
|
||||
|
||||
|
||||
@@ -5,13 +5,11 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void calcAtmospherics(vec3 inPositionEye);
|
||||
mat4 getObjectSkinnedTransform();
|
||||
|
||||
attribute vec4 object_weight;
|
||||
|
||||
void main()
|
||||
{
|
||||
mat4 mat = getObjectSkinnedTransform();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void calcAtmospherics(vec3 inPositionEye);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void fullbright_shiny_lighting_water();
|
||||
|
||||
|
||||
@@ -5,13 +5,11 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void calcAtmospherics(vec3 inPositionEye);
|
||||
mat4 getObjectSkinnedTransform();
|
||||
|
||||
attribute vec4 object_weight;
|
||||
|
||||
void main()
|
||||
{
|
||||
//transform vertex
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void calcAtmospherics(vec3 inPositionEye);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void fullbright_lighting_water();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void shiny_lighting();
|
||||
|
||||
|
||||
@@ -5,14 +5,12 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
|
||||
void calcAtmospherics(vec3 inPositionEye);
|
||||
mat4 getObjectSkinnedTransform();
|
||||
|
||||
attribute vec4 object_weight;
|
||||
|
||||
void main()
|
||||
{
|
||||
mat4 mat = getObjectSkinnedTransform();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
void calcAtmospherics(vec3 inPositionEye);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user