Bring the old urban shader (qualiti level=3.5) back to life on my video hardware by restricting the number of varying variables to a maximum of seven.
This commit is contained in:
parent
0ca0ee6ad2
commit
71283a3eae
2 changed files with 5 additions and 4 deletions
|
@ -55,12 +55,15 @@ float ray_intersect(sampler2D reliefMap, vec2 dp, vec2 ds)
|
||||||
|
|
||||||
void main (void)
|
void main (void)
|
||||||
{
|
{
|
||||||
|
float bump = 1.0;
|
||||||
|
|
||||||
if ( quality_level >= 3.5 ) {
|
if ( quality_level >= 3.5 ) {
|
||||||
linear_search_steps = 20;
|
linear_search_steps = 20;
|
||||||
}
|
}
|
||||||
vec2 uv, dp, ds;
|
|
||||||
|
vec2 uv, dp = vec2(0, 0), ds = vec2(0, 0);
|
||||||
vec3 N;
|
vec3 N;
|
||||||
float d;
|
float d = 0;
|
||||||
if ( bump > 0.9 && quality_level >= 2.0 )
|
if ( bump > 0.9 && quality_level >= 2.0 )
|
||||||
{
|
{
|
||||||
vec3 V = normalize(ecPosition.xyz);
|
vec3 V = normalize(ecPosition.xyz);
|
||||||
|
|
|
@ -5,7 +5,6 @@ varying vec3 VTangent;
|
||||||
varying vec3 VBinormal;
|
varying vec3 VBinormal;
|
||||||
varying vec3 Normal;
|
varying vec3 Normal;
|
||||||
varying vec4 constantColor;
|
varying vec4 constantColor;
|
||||||
varying float bump;
|
|
||||||
|
|
||||||
attribute vec3 tangent;
|
attribute vec3 tangent;
|
||||||
attribute vec3 binormal;
|
attribute vec3 binormal;
|
||||||
|
@ -18,7 +17,6 @@ void main(void)
|
||||||
VNormal = gl_NormalMatrix * gl_Normal;
|
VNormal = gl_NormalMatrix * gl_Normal;
|
||||||
VTangent = gl_NormalMatrix * tangent;
|
VTangent = gl_NormalMatrix * tangent;
|
||||||
VBinormal = gl_NormalMatrix * binormal;
|
VBinormal = gl_NormalMatrix * binormal;
|
||||||
bump = 1.0;
|
|
||||||
|
|
||||||
gl_FrontColor = gl_Color;
|
gl_FrontColor = gl_Color;
|
||||||
constantColor = gl_FrontMaterial.emission
|
constantColor = gl_FrontMaterial.emission
|
||||||
|
|
Loading…
Reference in a new issue