#version 430 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable // shader 392cf5ae4c5cf942 //point "sprites" verified // start of shader inputs/outputs, predetermined by Cemu. Do not touch #ifdef VULKAN #define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) #define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) #define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) #define gl_VertexID gl_VertexIndex #define gl_InstanceID gl_InstanceIndex #define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 #else #define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) #define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) #define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) #define SET_POSITION(_v) gl_Position = _v #endif #ifdef VULKAN layout(set = 0, binding = 0) uniform ufBlock { uniform ivec4 uf_remappedVS[17]; }; #else uniform ivec4 uf_remappedVS[17]; #endif ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; ATTR_LAYOUT(0, 1) in uvec4 attrDataSem5; out gl_PerVertex { vec4 gl_Position; float gl_PointSize; }; layout(location = 0) out vec4 passParameterSem144; // end of shader inputs/outputs int clampFI32(int v) { if( v == 0x7FFFFFFF ) return floatBitsToInt(1.0); else if( v == 0xFFFFFFFF ) return floatBitsToInt(0.0); return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); } float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; } const float resScale = float($gameWidth / $width); void main() { vec4 R0f = vec4(0.0); vec4 R1f = vec4(0.0); vec4 R2f = vec4(0.0); vec4 R3f = vec4(0.0); vec4 R4f = vec4(0.0); vec4 R5f = vec4(0.0); vec4 R123f = vec4(0.0); vec4 R124f = vec4(0.0); vec4 R125f = vec4(0.0); vec4 R126f = vec4(0.0); vec4 R127f = vec4(0.0); uvec4 attrDecoder; float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f; vec4 PV0f = vec4(0.0), PV1f = vec4(0.0); float PS0f = 0.0, PS1f = 0.0; vec4 tempf = vec4(0.0); float tempResultf; int tempResulti; ivec4 ARi = ivec4(0); bool predResult = true; vec3 cubeMapSTM; int cubeMapFaceId; R0f = floatBitsToInt(ivec4(gl_VertexID, 0, 0, gl_InstanceID)); attrDecoder.xyzw = attrDataSem0.xyzw; attrDecoder = ((attrDecoder>>8)&0xFF)|((attrDecoder<<8)&0xFF00); attrDecoder.xyzw = floatBitsToInt(vec4(unpackHalf2x16(attrDecoder.x|(attrDecoder.y<<16)),unpackHalf2x16(attrDecoder.z|(attrDecoder.w<<16)))); R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(int(attrDecoder.w))); attrDecoder.xyzw = attrDataSem5.xyzw; attrDecoder = ((attrDecoder>>8)&0xFF)|((attrDecoder<<8)&0xFF00); attrDecoder.xyzw = floatBitsToInt(vec4(unpackHalf2x16(attrDecoder.x|(attrDecoder.y<<16)),unpackHalf2x16(attrDecoder.z|(attrDecoder.w<<16)))); R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(int(attrDecoder.w))); // 0 PV0f.x = max(intBitsToFloat(uf_remappedVS[0].w), -(intBitsToFloat(uf_remappedVS[0].w))); R127f.y = mul_nonIEEE(R2f.x, intBitsToFloat(uf_remappedVS[1].x)); R127f.z = mul_nonIEEE(R2f.y, intBitsToFloat(uf_remappedVS[1].y)); PV0f.w = max(R1f.w, -(R1f.w)); R3f.w = 1.0; PS0f = R3f.w; // 1 R0f.x = -(intBitsToFloat(uf_remappedVS[2].x)) * intBitsToFloat(0x7f7ffffd); R0f.x = clamp(R0f.x, 0.0, 1.0); R125f.y = -(intBitsToFloat(uf_remappedVS[2].y)) * intBitsToFloat(0x7f7ffffd); R125f.y = clamp(R125f.y, 0.0, 1.0); PV1f.z = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedVS[3].y)); R125f.w = max(intBitsToFloat(uf_remappedVS[2].x), -(intBitsToFloat(uf_remappedVS[2].x))); tempResultf = max(0.0, PV0f.x); tempResultf = log2(tempResultf); if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; R126f.z = tempResultf; PS1f = R126f.z; // 2 PV0f.y = -(PV1f.z) + intBitsToFloat(uf_remappedVS[3].x); R5f.z = 0.0; R127f.w = mul_nonIEEE(R2f.z, intBitsToFloat(uf_remappedVS[1].z)); // 3 backupReg0f = R127f.y; R124f.x = max(PV0f.y, 0.0); PV1f.x = R124f.x; R127f.y = R127f.z + intBitsToFloat(uf_remappedVS[0].y); R127f.z = backupReg0f + intBitsToFloat(uf_remappedVS[0].x); R124f.w = max(intBitsToFloat(uf_remappedVS[2].y), -(intBitsToFloat(uf_remappedVS[2].y))); // 4 PV0f.x = mul_nonIEEE(PV1f.x, intBitsToFloat(uf_remappedVS[4].x)); PV0f.y = mul_nonIEEE(PV1f.x, R126f.z); PV0f.z = mul_nonIEEE(PV1f.x, intBitsToFloat(uf_remappedVS[4].z)); PV0f.w = mul_nonIEEE(PV1f.x, intBitsToFloat(uf_remappedVS[4].y)); R126f.w = PV1f.x + -(intBitsToFloat(0x3a83126f)); PS0f = R126f.w; // 5 PV1f.x = R2f.w + PV0f.w; PV1f.y = R2f.w + PV0f.x; R124f.z = -(intBitsToFloat(uf_remappedVS[2].z)) * intBitsToFloat(0x7f7ffffd); R124f.z = clamp(R124f.z, 0.0, 1.0); PV1f.w = R2f.w + PV0f.z; PS1f = exp2(PV0f.y); // 6 PV0f.x = PV1f.w * intBitsToFloat(0x40c90fdb); PV0f.y = PV1f.x * intBitsToFloat(0x40c90fdb); PV0f.z = PV1f.y * intBitsToFloat(0x40c90fdb); PV0f.w = -(PS1f) + 1.0; R127f.x = R127f.w + intBitsToFloat(uf_remappedVS[0].z); PS0f = R127f.x; // 7 R123f.x = (PV0f.y * intBitsToFloat(0x3e22f983) + 0.5); PV1f.x = R123f.x; R123f.y = (PV0f.x * intBitsToFloat(0x3e22f983) + 0.5); PV1f.y = R123f.y; R126f.z = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedVS[1].w)); PV1f.z = R126f.z; R123f.w = (PV0f.z * intBitsToFloat(0x3e22f983) + 0.5); PV1f.w = R123f.w; R2f.w = max(intBitsToFloat(uf_remappedVS[2].z), -(intBitsToFloat(uf_remappedVS[2].z))); PS1f = R2f.w; // 8 PV0f.x = fract(PV1f.y); R124f.y = mul_nonIEEE(PV1f.z, R127f.z); PV0f.z = fract(PV1f.w); PV0f.w = fract(PV1f.x); R2f.z = mul_nonIEEE(PV1f.z, R127f.y); PS0f = R2f.z; // 9 R126f.x = mul_nonIEEE(R124f.x, intBitsToFloat(uf_remappedVS[5].x)); R123f.y = (PV0f.z * intBitsToFloat(0x40c90fdb) + -(intBitsToFloat(0x40490fdb))); PV1f.y = R123f.y; R123f.z = (PV0f.w * intBitsToFloat(0x40c90fdb) + -(intBitsToFloat(0x40490fdb))); PV1f.z = R123f.z; R123f.w = (PV0f.x * intBitsToFloat(0x40c90fdb) + -(intBitsToFloat(0x40490fdb))); PV1f.w = R123f.w; R127f.z = mul_nonIEEE(R124f.x, intBitsToFloat(uf_remappedVS[5].y)); PS1f = R127f.z; // 10 R2f.x = PV1f.z * intBitsToFloat(0x3e22f983); R126f.y = PV1f.w * intBitsToFloat(0x3e22f983); R125f.z = PV1f.y * intBitsToFloat(0x3e22f983); PV0f.z = R125f.z; R127f.w = mul_nonIEEE(R1f.x, intBitsToFloat(uf_remappedVS[6].x)); R125f.x = mul_nonIEEE(R1f.y, intBitsToFloat(uf_remappedVS[6].y)); PS0f = R125f.x; // 11 backupReg0f = R127f.z; PV1f.x = mul_nonIEEE(R124f.x, intBitsToFloat(uf_remappedVS[5].z)); R2f.y = mul_nonIEEE(R126f.z, R127f.x); R127f.z = mul_nonIEEE(R124f.x, R126f.x); R0f.w = mul_nonIEEE(R124f.x, backupReg0f); R127f.y = sin((PV0f.z)/0.1591549367); PS1f = R127f.y; // 12 backupReg0f = R125f.x; R125f.x = mul_nonIEEE(R124f.x, PV1f.x); R1f.y = backupReg0f + intBitsToFloat(uf_remappedVS[7].y); R126f.z = R127f.w + intBitsToFloat(uf_remappedVS[7].x); PV0f.w = mul_nonIEEE(R1f.z, intBitsToFloat(uf_remappedVS[6].z)); R127f.w = sin((R2f.x)/0.1591549367); PS0f = R127f.w; // 13 backupReg0f = R124f.x; R124f.x = PV0f.w + intBitsToFloat(uf_remappedVS[7].z); R123f.y = (mul_nonIEEE(backupReg0f,intBitsToFloat(uf_remappedVS[8].x)) + intBitsToFloat(uf_remappedVS[8].y)); PV1f.y = R123f.y; R1f.z = R126f.w * intBitsToFloat(0x7f7ffffd); R1f.z = clamp(R1f.z, 0.0, 1.0); PS1f = cos((R125f.z)/0.1591549367); // 14 PV0f.y = floor(PV1f.y); PV0f.w = -(R127f.y) + PS1f; PS0f = cos((R2f.x)/0.1591549367); // 15 R123f.x = (mul_nonIEEE(PV0f.w,R0f.x) + R127f.y); PV1f.x = R123f.x; PV1f.y = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedVS[9].x)); PV1f.z = -(R127f.w) + PS0f; R127f.y = sin((R126f.y)/0.1591549367); PS1f = R127f.y; // 16 PV0f.x = fract(PV1f.y); PV0f.y = mul_nonIEEE(R125f.w, PV1f.x); PV0f.z = floor(PV1f.y); R123f.w = (mul_nonIEEE(PV1f.z,R125f.y) + R127f.w); PV0f.w = R123f.w; PS0f = cos((R126f.y)/0.1591549367); // 17 PV1f.x = mul_nonIEEE(R124f.w, PV0f.w); PV1f.y = -(R127f.y) + PS0f; PV1f.z = R124f.y + PV0f.y; PV1f.w = mul_nonIEEE(PV0f.x, intBitsToFloat(uf_remappedVS[10].x)); R5f.y = mul_nonIEEE(PV0f.z, intBitsToFloat(uf_remappedVS[9].y)); PS1f = R5f.y; // 18 PV0f.x = PV1f.z + R127f.z; PV0f.y = R2f.z + PV1f.x; R123f.z = (mul_nonIEEE(PV1f.y,R124f.z) + R127f.y); PV0f.z = R123f.z; PV0f.w = floor(PV1f.w); // 19 PV1f.x = PV0f.y + R0f.w; PV1f.z = R126f.z + PV0f.x; PV1f.w = mul_nonIEEE(R2f.w, PV0f.z); R5f.x = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedVS[9].x)); PS1f = R5f.x; // 20 PV0f.x = R2f.y + PV1f.w; PV0f.y = R1f.y + PV1f.x; R2f.z = fract(PV1f.z); PV0f.z = R2f.z; // 21 PV1f.x = PV0f.z + -(1.0); R2f.y = fract(PV0f.y); PV1f.y = R2f.y; R126f.z = mul_nonIEEE(PV0f.z, intBitsToFloat(uf_remappedVS[11].w)); R126f.z = clamp(R126f.z, 0.0, 1.0); PV1f.w = PV0f.x + R125f.x; // 22 PV0f.x = R124f.x + PV1f.w; PV0f.y = max(PV1f.x, -(PV1f.x)); PV0f.z = mul_nonIEEE(PV1f.y, intBitsToFloat(uf_remappedVS[11].w)); PV0f.z = clamp(PV0f.z, 0.0, 1.0); PV0f.w = PV1f.y + -(1.0); // 23 PV1f.x = max(PV0f.w, -(PV0f.w)); R127f.y = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedVS[11].w)); R127f.y = clamp(R127f.y, 0.0, 1.0); R0f.z = fract(PV0f.x); PV1f.z = R0f.z; R124f.w = min(R126f.z, PV0f.z); // 24 PV0f.x = mul_nonIEEE(PV1f.z, intBitsToFloat(uf_remappedVS[11].w)); PV0f.x = clamp(PV0f.x, 0.0, 1.0); PV0f.y = mul_nonIEEE(PV1f.x, intBitsToFloat(uf_remappedVS[11].w)); PV0f.y = clamp(PV0f.y, 0.0, 1.0); PV0f.z = PV1f.z + -(1.0); // 25 R0f.x = min(R127f.y, PV0f.y); R1f.y = min(PV0f.x, R124f.w); R0f.w = max(PV0f.z, -(PV0f.z)); // 0 PV0f.x = mul_nonIEEE(R0f.w, intBitsToFloat(uf_remappedVS[11].w)); PV0f.x = clamp(PV0f.x, 0.0, 1.0); // 1 PV1f.z = min(PV0f.x, R0f.x); // 2 backupReg0f = R0f.z; tempf.x = dot(vec4(R2f.z,R2f.y,backupReg0f,R3f.w),vec4(intBitsToFloat(uf_remappedVS[12].x),intBitsToFloat(uf_remappedVS[12].y),intBitsToFloat(uf_remappedVS[12].z),intBitsToFloat(uf_remappedVS[12].w))); PV0f.x = tempf.x; PV0f.y = tempf.x; PV0f.z = tempf.x; PV0f.w = tempf.x; R4f.w = tempf.x; PS0f = mul_nonIEEE(PV1f.z, R1f.y); // 3 PV1f.y = PV0f.x + -(intBitsToFloat(uf_remappedVS[2].w)); R126f.z = mul_nonIEEE(R1f.z, PS0f); // 4 PV0f.x = mul_nonIEEE(PV1f.y, intBitsToFloat(uf_remappedVS[13].w)); PV0f.x = clamp(PV0f.x, 0.0, 1.0); // 5 R5f.w = mul_nonIEEE(R126f.z, PV0f.x); PV1f.w = R5f.w; // 6 PV0f.z = PV1f.w + -(intBitsToFloat(0x3a83126f)); // 7 tempf.x = dot(vec4(R2f.z,R2f.y,R0f.z,R3f.w),vec4(intBitsToFloat(uf_remappedVS[14].x),intBitsToFloat(uf_remappedVS[14].y),intBitsToFloat(uf_remappedVS[14].z),intBitsToFloat(uf_remappedVS[14].w))); PV1f.x = tempf.x; PV1f.y = tempf.x; PV1f.z = tempf.x; PV1f.w = tempf.x; R4f.z = tempf.x; R124f.w = PV0f.z * intBitsToFloat(0x7f7ffffd); R124f.w = clamp(R124f.w, 0.0, 1.0); PS1f = R124f.w; // 8 PV0f.y = -(PS1f) + 1.0; R124f.x = 1.0 / PV1f.x; PS0f = R124f.x; // 9 backupReg0f = R0f.z; tempf.x = dot(vec4(R2f.z,R2f.y,backupReg0f,R3f.w),vec4(intBitsToFloat(uf_remappedVS[15].x),intBitsToFloat(uf_remappedVS[15].y),intBitsToFloat(uf_remappedVS[15].z),intBitsToFloat(uf_remappedVS[15].w))); PV1f.x = tempf.x; PV1f.y = tempf.x; PV1f.z = tempf.x; PV1f.w = tempf.x; R126f.z = PV0f.y * intBitsToFloat(0x7f7ffffd); PS1f = R126f.z; // 10 backupReg0f = R0f.z; tempf.x = dot(vec4(R2f.z,R2f.y,backupReg0f,R3f.w),vec4(intBitsToFloat(uf_remappedVS[16].x),intBitsToFloat(uf_remappedVS[16].y),intBitsToFloat(uf_remappedVS[16].z),intBitsToFloat(uf_remappedVS[16].w))); PV0f.x = tempf.x; PV0f.y = tempf.x; PV0f.z = tempf.x; PV0f.w = tempf.x; R4f.x = PV1f.x + PS1f; PS0f = R4f.x; // 11 R4f.y = PV0f.x + R126f.z; PV1f.w = R124f.x * intBitsToFloat(uf_remappedVS[11].z); // 12 R0f.x = mul_nonIEEE(R124f.w, PV1f.w); // export SET_POSITION(vec4(R4f.x, R4f.y, R4f.z, R4f.w)); // export gl_PointSize = (vec4(R0f.x, R0f.y, R0f.y, R0f.y)).x/resScale; // export passParameterSem144 = vec4(R5f.x, R5f.y, R5f.z, R5f.w); // 0 }