mirror of https://github.com/OpenMW/openmw.git
shade refactor
parent
cc5f20d66a
commit
ac4787aeec
@ -1,16 +1,17 @@
|
||||
#version 120
|
||||
|
||||
uniform mat4 projectionMatrix;
|
||||
|
||||
varying vec2 diffuseMapUV;
|
||||
varying float alphaPassthrough;
|
||||
|
||||
#include "openmw_vertex.h.glsl"
|
||||
#include "lib/core/vertex.h.glsl"
|
||||
#include "vertexcolors.glsl"
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = mw_modelToClip(gl_Vertex);
|
||||
gl_Position = modelToClip(gl_Vertex);
|
||||
|
||||
vec4 viewPos = modelToView(gl_Vertex);
|
||||
gl_ClipVertex = viewPos;
|
||||
|
||||
if (colorMode == 2)
|
||||
alphaPassthrough = gl_Color.a;
|
@ -0,0 +1,10 @@
|
||||
#version 120
|
||||
|
||||
varying vec2 uv;
|
||||
|
||||
#include "lib/core/fragment.h.glsl"
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = samplerLastShader(uv);
|
||||
}
|
@ -1,12 +1,14 @@
|
||||
#version 120
|
||||
|
||||
#include "lib/luminance/constants.glsl"
|
||||
|
||||
varying vec2 uv;
|
||||
uniform sampler2D sceneTex;
|
||||
|
||||
void main()
|
||||
{
|
||||
float lum = dot(texture2D(sceneTex, uv).rgb, vec3(0.2126, 0.7152, 0.0722));
|
||||
lum = max(lum, @epsilon);
|
||||
lum = max(lum, epsilon);
|
||||
|
||||
gl_FragColor.r = clamp((log2(lum) - @minLog) * @invLogLumRange, 0.0, 1.0);
|
||||
gl_FragColor.r = clamp((log2(lum) - minLog) * invLogLumRange, 0.0, 1.0);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
#version 120
|
||||
|
||||
varying vec2 uv;
|
||||
uniform samplerCube cubeMap;
|
||||
uniform int mapping;
|
||||
|
||||
#include "lib/util/coordinates.glsl"
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec3 c;
|
||||
|
||||
if (mapping == 0)
|
||||
c = sphericalCoords(uv);
|
||||
else if (mapping == 1)
|
||||
c = cylindricalCoords(uv);
|
||||
else
|
||||
c = planetCoords(uv);
|
||||
|
||||
gl_FragData[0] = textureCube(cubeMap,c);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
#version 120
|
||||
|
||||
#include "skypasses.glsl"
|
||||
#include "lib/sky/passes.glsl"
|
||||
|
||||
uniform int pass;
|
||||
uniform sampler2D diffuseMap;
|
@ -1,20 +1,20 @@
|
||||
#version 120
|
||||
|
||||
#include "openmw_vertex.h.glsl"
|
||||
#include "lib/core/vertex.h.glsl"
|
||||
|
||||
varying vec4 position;
|
||||
varying float linearDepth;
|
||||
|
||||
#include "shadows_vertex.glsl"
|
||||
#include "depth.glsl"
|
||||
#include "lib/view/depth.glsl"
|
||||
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = mw_modelToClip(gl_Vertex);
|
||||
gl_Position = modelToClip(gl_Vertex);
|
||||
|
||||
position = gl_Vertex;
|
||||
|
||||
vec4 viewPos = mw_modelToView(gl_Vertex);
|
||||
vec4 viewPos = modelToView(gl_Vertex);
|
||||
linearDepth = getLinearDepth(gl_Position.z, viewPos.z);
|
||||
|
||||
setupShadowCoords(viewPos, normalize((gl_NormalMatrix * gl_Normal).xyz));
|
@ -0,0 +1,15 @@
|
||||
#version 430 core
|
||||
|
||||
layout (location = 0) in vec4 Position;
|
||||
layout (location = 3) in vec4 Color;
|
||||
layout (location = 8) in vec3 TexCoord0;
|
||||
|
||||
out vec4 passColor;
|
||||
out vec2 uv;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(Position.xyz, 1.0);
|
||||
uv = TexCoord0.xy;
|
||||
passColor = Color;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
#version 430 core
|
||||
|
||||
layout(location = 0) out vec4 Color;
|
||||
|
||||
layout(location = 0) uniform sampler2D diffuseMap;
|
||||
|
||||
in vec4 passColor;
|
||||
in vec2 uv;
|
||||
|
||||
void main()
|
||||
{
|
||||
Color = texture(diffuseMap, uv) * passColor;
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
#if @reverseZ
|
||||
uniform float linearFac;
|
||||
#endif
|
||||
|
||||
float getLinearDepth(in float z, in float viewZ)
|
||||
{
|
||||
#if @reverseZ
|
||||
return linearFac*viewZ;
|
||||
#else
|
||||
return z;
|
||||
#endif
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
#version 120
|
||||
|
||||
varying vec2 uv;
|
||||
|
||||
#include "openmw_fragment.h.glsl"
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = mw_samplerLastShader(uv);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
#ifndef OPENMW_FRAGMENT_H_GLSL
|
||||
#define OPENMW_FRAGMENT_H_GLSL
|
||||
|
||||
@link "lib/core/fragment.glsl" if !@useOVR_multiview
|
||||
@link "lib/core/fragment_multiview.glsl" if @useOVR_multiview
|
||||
|
||||
vec4 sampleReflectionMap(vec2 uv);
|
||||
|
||||
#if @refraction_enabled
|
||||
vec4 sampleRefractionMap(vec2 uv);
|
||||
float sampleRefractionDepthMap(vec2 uv);
|
||||
#endif
|
||||
|
||||
vec4 samplerLastShader(vec2 uv);
|
||||
|
||||
#if @skyBlending
|
||||
vec3 sampleSkyColor(vec2 uv);
|
||||
#endif
|
||||
|
||||
#endif // OPENMW_FRAGMENT_H_GLSL
|
@ -0,0 +1,46 @@
|
||||
#version 330
|
||||
|
||||
#extension GL_OVR_multiview : require
|
||||
#extension GL_OVR_multiview2 : require
|
||||
|
||||
#include "lib/core/fragment.h.glsl"
|
||||
|
||||
uniform sampler2DArray reflectionMap;
|
||||
|
||||
vec4 sampleReflectionMap(vec2 uv)
|
||||
{
|
||||
return texture(reflectionMap, vec3((uv), gl_ViewID_OVR));
|
||||
}
|
||||
|
||||
#if @refraction_enabled
|
||||
|
||||
uniform sampler2DArray refractionMap;
|
||||
uniform sampler2DArray refractionDepthMap;
|
||||
|
||||
vec4 sampleRefractionMap(vec2 uv)
|
||||
{
|
||||
return texture(refractionMap, vec3((uv), gl_ViewID_OVR));
|
||||
}
|
||||
|
||||
float sampleRefractionDepthMap(vec2 uv)
|
||||
{
|
||||
return texture(refractionDepthMap, vec3((uv), gl_ViewID_OVR)).x;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
uniform sampler2DArray lastShader;
|
||||
|
||||
vec4 samplerLastShader(vec2 uv)
|
||||
{
|
||||
return texture(lastShader, vec3((uv), gl_ViewID_OVR));
|
||||
}
|
||||
|
||||
#if @skyBlending
|
||||
uniform sampler2DArray sky;
|
||||
|
||||
vec3 sampleSkyColor(vec2 uv)
|
||||
{
|
||||
return texture(sky, vec3((uv), gl_ViewID_OVR)).xyz;
|
||||
}
|
||||
#endif
|
@ -0,0 +1,20 @@
|
||||
#version 120
|
||||
|
||||
#include "lib/core/vertex.h.glsl"
|
||||
|
||||
uniform mat4 projectionMatrix;
|
||||
|
||||
vec4 modelToClip(vec4 pos)
|
||||
{
|
||||
return projectionMatrix * modelToView(pos);
|
||||
}
|
||||
|
||||
vec4 modelToView(vec4 pos)
|
||||
{
|
||||
return gl_ModelViewMatrix * pos;
|
||||
}
|
||||
|
||||
vec4 viewToClip(vec4 pos)
|
||||
{
|
||||
return projectionMatrix * pos;
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
@link "lib/core/vertex.glsl" if !@useOVR_multiview
|
||||
@link "lib/core/vertex_multiview.glsl" if @useOVR_multiview
|
||||
|
||||
vec4 modelToClip(vec4 pos);
|
||||
vec4 modelToView(vec4 pos);
|
||||
vec4 viewToClip(vec4 pos);
|
@ -1,25 +1,25 @@
|
||||
#version 330 compatibility
|
||||
#version 330
|
||||
|
||||
#extension GL_OVR_multiview : require
|
||||
#extension GL_OVR_multiview2 : require
|
||||
|
||||
layout(num_views = @numViews) in;
|
||||
|
||||
#include "openmw_vertex.h.glsl"
|
||||
#include "lib/core/vertex.h.glsl"
|
||||
|
||||
uniform mat4 projectionMatrixMultiView[@numViews];
|
||||
|
||||
vec4 mw_modelToClip(vec4 pos)
|
||||
vec4 modelToClip(vec4 pos)
|
||||
{
|
||||
return mw_viewToClip(mw_modelToView(pos));
|
||||
return viewToClip(modelToView(pos));
|
||||
}
|
||||
|
||||
vec4 mw_modelToView(vec4 pos)
|
||||
vec4 modelToView(vec4 pos)
|
||||
{
|
||||
return gl_ModelViewMatrix * pos;
|
||||
}
|
||||
|
||||
vec4 mw_viewToClip(vec4 pos)
|
||||
vec4 viewToClip(vec4 pos)
|
||||
{
|
||||
return projectionMatrixMultiView[gl_ViewID_OVR] * pos;
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
#ifndef LUMINANCE_CONSTANTS
|
||||
#define LUMINANCE_CONSTANTS
|
||||
|
||||
const float minLog = -9.0;
|
||||
const float maxLog = 4.0;
|
||||
const float logLumRange = (maxLog - minLog);
|
||||
const float invLogLumRange = 1.0 / logLumRange;
|
||||
const float epsilon = 0.004;
|
||||
const float hdrExposureTime = @hdrExposureTime;
|
||||
|
||||
#endif
|
@ -0,0 +1,15 @@
|
||||
#ifndef LIB_PARTICLE_OCCLUSION
|
||||
#define LIB_PARTICLE_OCCLUSION
|
||||
|
||||
void applyOcclusionDiscard(in vec3 coord, float sceneDepth)
|
||||
{
|
||||
#if @reverseZ
|
||||
if (coord.z < sceneDepth)
|
||||
discard;
|
||||
#else
|
||||
if (coord.z * 0.5 + 0.5 > sceneDepth)
|
||||
discard;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,12 @@
|
||||
#ifndef LIB_UTIL_QUICKSTEP
|
||||
#define LIB_UTIL_QUICKSTEP
|
||||
|
||||
float quickstep(float x)
|
||||
{
|
||||
x = clamp(x, 0.0, 1.0);
|
||||
x = 1.0 - x*x;
|
||||
x = 1.0 - x*x;
|
||||
return x;
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,24 @@
|
||||
#ifndef LIB_VIEW_DEPTH
|
||||
#define LIB_VIEW_DEPTH
|
||||
|
||||
float linearizeDepth(float depth, float near, float far)
|
||||
{
|
||||
#if @reverseZ
|
||||
depth = 1.0 - depth;
|
||||
#endif
|
||||
float z_n = 2.0 * depth - 1.0;
|
||||
depth = 2.0 * near * far / (far + near - z_n * (far - near));
|
||||
return depth;
|
||||
}
|
||||
|
||||
float getLinearDepth(in float z, in float viewZ)
|
||||
{
|
||||
#if @reverseZ
|
||||
// FIXME: Fixme, figure out how to calculate correct linear depth for reverse z
|
||||
return -viewZ;
|
||||
#else
|
||||
return z;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,23 @@
|
||||
#ifndef LIB_WATER_FRESNEL
|
||||
#define LIB_WATER_FRESNEL
|
||||
|
||||
float fresnel_dielectric(vec3 Incoming, vec3 Normal, float eta)
|
||||
{
|
||||
float c = abs(dot(Incoming, Normal));
|
||||
float g = eta * eta - 1.0 + c * c;
|
||||
float result;
|
||||
|
||||
if (g > 0.0) {
|
||||
g = sqrt(g);
|
||||
float A =(g - c)/(g + c);
|
||||
float B =(c *(g + c)- 1.0)/(c *(g - c)+ 1.0);
|
||||
result = 0.5 * A * A *(1.0 + B * B);
|
||||
}
|
||||
else {
|
||||
result = 1.0; /* TIR (no refracted component) */
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,126 @@
|
||||
#ifndef LIB_WATER_RIPPLES
|
||||
#define LIB_WATER_RIPPLES
|
||||
|
||||
#define RAIN_RIPPLE_DETAIL @rain_ripple_detail
|
||||
|
||||
const float RAIN_RIPPLE_GAPS = 10.0;
|
||||
const float RAIN_RIPPLE_RADIUS = 0.2;
|
||||
|
||||
float scramble(float x, float z)
|
||||
{
|
||||
return fract(pow(fract(x)*3.0+1.0, z));
|
||||
}
|
||||
|
||||
vec2 randOffset(vec2 c, float time)
|
||||
{
|
||||
time = fract(time/1000.0);
|
||||
c = vec2(c.x * c.y / 8.0 + c.y * 0.3 + c.x * 0.2,
|
||||
c.x * c.y / 14.0 + c.y * 0.5 + c.x * 0.7);
|
||||
c.x *= scramble(scramble(time + c.x/1000.0, 4.0), 3.0) + 1.0;
|
||||
c.y *= scramble(scramble(time + c.y/1000.0, 3.5), 3.0) + 1.0;
|
||||
return fract(c);
|
||||
}
|
||||
|
||||
float randPhase(vec2 c)
|
||||
{
|
||||
return fract((c.x * c.y) / (c.x + c.y + 0.1));
|
||||
}
|
||||
|
||||
float blip(float x)
|
||||
{
|
||||
x = max(0.0, 1.0-x*x);
|
||||
return x*x*x;
|
||||
}
|
||||
|
||||
float blipDerivative(float x)
|
||||
{
|
||||
x = clamp(x, -1.0, 1.0);
|
||||
float n = x*x-1.0;
|
||||
return -6.0*x*n*n;
|
||||
}
|
||||
|
||||
const float RAIN_RING_TIME_OFFSET = 1.0/6.0;
|
||||
|
||||
vec4 circle(vec2 coords, vec2 corner, float adjusted_time)
|
||||
{
|
||||
vec2 center = vec2(0.5,0.5) + (0.5 - RAIN_RIPPLE_RADIUS) * (2.0 * randOffset(corner, floor(adjusted_time)) - 1.0);
|
||||
float phase = fract(adjusted_time);
|
||||
vec2 toCenter = coords - center;
|
||||
|
||||
float r = RAIN_RIPPLE_RADIUS;
|
||||
float d = length(toCenter);
|
||||
float ringfollower = (phase-d/r)/RAIN_RING_TIME_OFFSET-1.0; // -1.0 ~ +1.0 cover the breadth of the ripple's ring
|
||||
|
||||
#if RAIN_RIPPLE_DETAIL > 0
|
||||
// normal mapped ripples
|
||||
if(ringfollower < -1.0 || ringfollower > 1.0)
|
||||
return vec4(0.0);
|
||||
|
||||
if(d > 1.0) // normalize center direction vector, but not for near-center ripples
|
||||
toCenter /= d;
|
||||
|
||||
float height = blip(ringfollower*2.0+0.5); // brighten up outer edge of ring; for fake specularity
|
||||
float range_limit = blip(min(0.0, ringfollower));
|
||||
float energy = 1.0-phase;
|
||||
|
||||
vec2 normal2d = -toCenter*blipDerivative(ringfollower)*5.0;
|
||||
vec3 normal = vec3(normal2d, 0.5);
|
||||
vec4 ret = vec4(normal, height);
|
||||
ret.xyw *= energy*energy;
|
||||
// do energy adjustment here rather than later, so that we can use the w component for fake specularity
|
||||
ret.xyz = normalize(ret.xyz) * energy*range_limit;
|
||||
ret.z *= range_limit;
|
||||
return ret;
|
||||
#else
|
||||
// ring-only ripples
|
||||
if(ringfollower < -1.0 || ringfollower > 0.5)
|
||||
return vec4(0.0);
|
||||
|
||||
float energy = 1.0-phase;
|
||||
float height = blip(ringfollower*2.0+0.5)*energy*energy; // fake specularity
|
||||
|
||||
return vec4(0.0, 0.0, 0.0, height);
|
||||
#endif
|
||||
}
|
||||
vec4 rain(vec2 uv, float time)
|
||||
{
|
||||
uv *= RAIN_RIPPLE_GAPS;
|
||||
vec2 f_part = fract(uv);
|
||||
vec2 i_part = floor(uv);
|
||||
float adjusted_time = time * 1.2 + randPhase(i_part);
|
||||
#if RAIN_RIPPLE_DETAIL > 0
|
||||
vec4 a = circle(f_part, i_part, adjusted_time);
|
||||
vec4 b = circle(f_part, i_part, adjusted_time - RAIN_RING_TIME_OFFSET);
|
||||
vec4 c = circle(f_part, i_part, adjusted_time - RAIN_RING_TIME_OFFSET*2.0);
|
||||
vec4 d = circle(f_part, i_part, adjusted_time - RAIN_RING_TIME_OFFSET*3.0);
|
||||
vec4 ret;
|
||||
ret.xy = a.xy - b.xy/2.0 + c.xy/4.0 - d.xy/8.0;
|
||||
// z should always point up
|
||||
ret.z = a.z + b.z /2.0 + c.z /4.0 + d.z /8.0;
|
||||
//ret.xyz *= 1.5;
|
||||
// fake specularity looks weird if we use every single ring, also if the inner rings are too bright
|
||||
ret.w = (a.w + c.w /8.0)*1.5;
|
||||
return ret;
|
||||
#else
|
||||
return circle(f_part, i_part, adjusted_time) * 1.5;
|
||||
#endif
|
||||
}
|
||||
|
||||
vec2 complex_mult(vec2 a, vec2 b)
|
||||
{
|
||||
return vec2(a.x*b.x - a.y*b.y, a.x*b.y + a.y*b.x);
|
||||
}
|
||||
vec4 rainCombined(vec2 uv, float time) // returns ripple normal in xyz and fake specularity in w
|
||||
{
|
||||
return
|
||||
rain(uv, time)
|
||||
+ rain(complex_mult(uv, vec2(0.4, 0.7)) + vec2(1.2, 3.0),time)
|
||||
#if RAIN_RIPPLE_DETAIL == 2
|
||||
+ rain(uv * 0.75 + vec2( 3.7,18.9),time)
|
||||
+ rain(uv * 0.9 + vec2( 5.7,30.1),time)
|
||||
+ rain(uv * 1.0 + vec2(10.5 ,5.7),time)
|
||||
#endif
|
||||
;
|
||||
}
|
||||
|
||||
#endif
|
@ -1,20 +0,0 @@
|
||||
#ifndef OPENMW_FRAGMENT_H_GLSL
|
||||
#define OPENMW_FRAGMENT_H_GLSL
|
||||
|
||||
@link "openmw_fragment.glsl" if !@useOVR_multiview
|
||||
@link "openmw_fragment_multiview.glsl" if @useOVR_multiview
|
||||
|
||||
vec4 mw_sampleReflectionMap(vec2 uv);
|
||||
|
||||
#if @refraction_enabled
|
||||
vec4 mw_sampleRefractionMap(vec2 uv);
|
||||
float mw_sampleRefractionDepthMap(vec2 uv);
|
||||
#endif
|
||||
|
||||
vec4 mw_samplerLastShader(vec2 uv);
|
||||
|
||||
#if @skyBlending
|
||||
vec3 mw_sampleSkyColor(vec2 uv);
|
||||
#endif
|
||||
|
||||
#endif // OPENMW_FRAGMENT_H_GLSL
|
@ -1,47 +0,0 @@
|
||||
#version 330 compatibility
|
||||
|
||||
#extension GL_OVR_multiview : require
|
||||
#extension GL_OVR_multiview2 : require
|
||||
#extension GL_EXT_texture_array : require
|
||||
|
||||
#include "openmw_fragment.h.glsl"
|
||||
|
||||
uniform sampler2DArray reflectionMap;
|
||||
|
||||
vec4 mw_sampleReflectionMap(vec2 uv)
|
||||
{
|
||||
return texture2DArray(reflectionMap, vec3((uv), gl_ViewID_OVR));
|
||||
}
|
||||
|
||||
#if @refraction_enabled
|
||||
|
||||
uniform sampler2DArray refractionMap;
|
||||
uniform sampler2DArray refractionDepthMap;
|
||||
|
||||
vec4 mw_sampleRefractionMap(vec2 uv)
|
||||
{
|
||||
return texture2DArray(refractionMap, vec3((uv), gl_ViewID_OVR));
|
||||
}
|
||||
|
||||
float mw_sampleRefractionDepthMap(vec2 uv)
|
||||
{
|
||||
return texture2DArray(refractionDepthMap, vec3((uv), gl_ViewID_OVR)).x;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
uniform sampler2DArray omw_SamplerLastShader;
|
||||
|
||||
vec4 mw_samplerLastShader(vec2 uv)
|
||||
{
|
||||
return texture2DArray(omw_SamplerLastShader, vec3((uv), gl_ViewID_OVR));
|
||||
}
|
||||
|
||||
#if @skyBlending
|
||||
uniform sampler2DArray sky;
|
||||
|
||||
vec3 mw_sampleSkyColor(vec2 uv)
|
||||
{
|
||||
return texture2DArray(sky, vec3((uv), gl_ViewID_OVR)).xyz;
|
||||
}
|
||||
#endif
|
@ -1,20 +0,0 @@
|
||||
#version 120
|
||||
|
||||
#include "openmw_vertex.h.glsl"
|
||||
|
||||
uniform mat4 projectionMatrix;
|
||||
|
||||
vec4 mw_modelToClip(vec4 pos)
|
||||
{
|
||||
return projectionMatrix * mw_modelToView(pos);
|
||||
}
|
||||
|
||||
vec4 mw_modelToView(vec4 pos)
|
||||
{
|
||||
return gl_ModelViewMatrix * pos;
|
||||
}
|
||||
|
||||
vec4 mw_viewToClip(vec4 pos)
|
||||
{
|
||||
return projectionMatrix * pos;
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
@link "openmw_vertex.glsl" if !@useOVR_multiview
|
||||
@link "openmw_vertex_multiview.glsl" if @useOVR_multiview
|
||||
|
||||
vec4 mw_modelToClip(vec4 pos);
|
||||
vec4 mw_modelToView(vec4 pos);
|
||||
vec4 mw_viewToClip(vec4 pos);
|
@ -1,15 +0,0 @@
|
||||
#version 120
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
varying vec2 diffuseMapUV;
|
||||
|
||||
#include "vertexcolors.glsl"
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragData[0].rgb = vec3(1.0);
|
||||
gl_FragData[0].a = texture2D(diffuseMap, diffuseMapUV).a * getDiffuseColor().a;
|
||||
|
||||
if (gl_FragData[0].a <= 0.5)
|
||||
discard;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
#version 120
|
||||
|
||||
uniform mat4 projectionMatrix;
|
||||
varying vec2 diffuseMapUV;
|
||||
|
||||
#include "vertexcolors.glsl"
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = projectionMatrix * (gl_ModelViewMatrix * gl_Vertex);
|
||||
diffuseMapUV = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;
|
||||
passColor = gl_Color;
|
||||
}
|
Loading…
Reference in New Issue