cemu-game-mods/Enhancements/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/314b77349f0636db_0000000000000000_vs.txt
Skal Fate 1a160d351d
Botw Cel-Shading Removal Pack and Distant Fog Removal Pack Uploaded (#340)
* Botw Cel-Shading Removal Pack Uploaded

* Botw Distant Fog Removal Pack Uploaded
2019-03-12 23:03:48 -06:00

86 lines
3.3 KiB
Plaintext

#version 420
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_packing : enable
// shader 314b77349f0636db -- Vertex Shader -- Lights up Cel-Shade Link and NPCs but also messes up the sky in the new methods
uniform ivec4 uf_remappedVS[1];
uniform vec2 uf_windowSpaceToClipSpaceTransform;
layout(binding = 32) uniform sampler2D textureUnitVS0;// Tex0 addr 0xf4ccf000 res 1280x720x1 dim 1 tm: 4 format 0007 compSel: 0 0 0 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler273 ClampX/Y/Z: 0 0 0 border: 0
layout(location = 0) in uvec4 attrDataSem0;
layout(location = 1) in uvec4 attrDataSem1;
out gl_PerVertex
{
vec4 gl_Position;
float gl_PointSize;
};
layout(location = 0) out vec4 passParameterSem0;
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; }
void main()
{
ivec4 R0i = ivec4(0);
ivec4 R1i = ivec4(0);
ivec4 R2i = ivec4(0);
ivec4 R3i = ivec4(0);
ivec4 R127i = ivec4(0);
uvec4 attrDecoder;
int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i;
ivec4 PV0i = ivec4(0), PV1i = ivec4(0);
int PS0i = 0, PS1i = 0;
ivec4 tempi = ivec4(0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0i = ivec4(gl_VertexID, 0, 0, gl_InstanceID);
attrDecoder.xyz = attrDataSem0.xyz;
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
attrDecoder.w = 0;
R1i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), floatBitsToInt(1.0));
attrDecoder.xy = attrDataSem1.xy;
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
attrDecoder.z = 0;
attrDecoder.w = 0;
R2i = ivec4(int(attrDecoder.x), int(attrDecoder.y), floatBitsToInt(0.0), floatBitsToInt(1.0));
// 0
backupReg0i = R1i.x;
backupReg1i = R1i.y;
R1i.x = backupReg0i;
R1i.x = floatBitsToInt(intBitsToFloat(R1i.x) * 2.0);
R1i.y = backupReg1i;
R1i.y = floatBitsToInt(intBitsToFloat(R1i.y) * 2.0);
R1i.z = 0x3f800000;
R0i.w = 0;
R3i.z = floatBitsToInt(intBitsToFloat(uf_remappedVS[0].y) * intBitsToFloat(0x437f0000));
PS0i = R3i.z;
R0i.xy = ivec4(textureSize(textureUnitVS0, 0),1,1).xy;
// export
gl_Position = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.z));
// 0
R127i.z = floatBitsToInt(float(R0i.x));
PS0i = R127i.z;
// 1
R127i.y = floatBitsToInt(float(R0i.y));
PS1i = R127i.y;
// 2
PS0i = floatBitsToInt(1.0 / intBitsToFloat(R127i.z));
// 3
R3i.x = floatBitsToInt((-(intBitsToFloat(PS0i)) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R2i.x)));
PS1i = floatBitsToInt(1.0 / intBitsToFloat(R127i.y));
// 4
R3i.y = floatBitsToInt((-(intBitsToFloat(PS1i)) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R2i.y)));
// export
passParameterSem0 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.z)); // propety w is not set to 4.0 so it wont get processed the same way as the other 2 vertex shader
}