From 42b5f1997cdd5e99645e24dca6cb89cc7b081a09 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 1 Nov 2025 18:23:08 -0700 Subject: Add support for alpha mode --- shaders/cook_torrance.vert | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'shaders/cook_torrance.vert') diff --git a/shaders/cook_torrance.vert b/shaders/cook_torrance.vert index 5f126c0..17fe1f7 100644 --- a/shaders/cook_torrance.vert +++ b/shaders/cook_torrance.vert @@ -5,7 +5,7 @@ uniform mat4 ModelMatrix; uniform mat4 View; uniform mat4 Projection; //uniform mat4 MVP; -#ifdef HAS_JOINTS +#if HAS_JOINTS // The client should pass in an appropriate value for MAX_JOINTS. // #define MAX_JOINTS 96 // @@ -21,35 +21,35 @@ uniform mat4 JointMatrices[MAX_JOINTS]; // Use 4x4 for now to keep it simple. #endif layout (location = 0) in vec3 vPosition; -#ifdef HAS_NORMALS +#if HAS_NORMALS layout (location = 1) in vec3 vNormal; #endif -#ifdef HAS_TANGENTS +#if HAS_TANGENTS layout (location = 2) in vec4 vTangent; #endif -#ifdef HAS_TEXCOORDS +#if HAS_TEXCOORDS layout (location = 3) in vec2 vTexcoord; #endif -#ifdef HAS_JOINTS +#if HAS_JOINTS layout (location = 4) in uvec4 vJoint; layout (location = 5) in vec4 vWeight; #endif // World-space position, normal and tangent. out vec3 Position; -#ifdef HAS_NORMALS +#if HAS_NORMALS out vec3 Normal; #endif -#ifdef HAS_TANGENTS +#if HAS_TANGENTS out vec4 Tangent; #endif -#ifdef HAS_TEXCOORDS +#if HAS_TEXCOORDS out vec2 Texcoord; #endif void main() { -#ifdef HAS_JOINTS +#if HAS_JOINTS mat4 skinMatrix = vWeight.x * JointMatrices[vJoint.x] + vWeight.y * JointMatrices[vJoint.y] + @@ -59,14 +59,14 @@ void main() #else Position = vec3(ModelMatrix * vec4(vPosition, 1.0)); #endif -#ifdef HAS_NORMALS +#if HAS_NORMALS Normal = mat3(ModelMatrix) * vNormal; //Normal = normalize(ModelMatrix * vec4(vNormal, 0.0)).xyz; #endif -#ifdef HAS_TANGENTS +#if HAS_TANGENTS Tangent = vec4(mat3(ModelMatrix) * vTangent.xyz, vTangent.w); #endif -#ifdef HAS_TEXCOORDS +#if HAS_TEXCOORDS Texcoord = vTexcoord; #endif gl_Position = Projection * View * vec4(Position, 1.0); -- cgit v1.2.3