mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-12-27 02:11:50 +01:00
[BotW] add cloud vs
this should fix misplaced cloud in 1.2.x and beofre
This commit is contained in:
parent
1a2f99f1d6
commit
d94fba8560
105
Source/BreathOfTheWild/01bef64ec0cccd53_0000000000000000_vs.txt
Normal file
105
Source/BreathOfTheWild/01bef64ec0cccd53_0000000000000000_vs.txt
Normal file
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
include 'Source/functions.php';
|
||||
$fullWidth = $argv[1];
|
||||
$fullHeight = $argv[2];
|
||||
$scaleFactorX = always_decimal_format($fullWidth / 1280.0);
|
||||
$scaleFactorY = always_decimal_format($fullHeight / 720.0);
|
||||
?>
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
#extension GL_ARB_shading_language_packing : enable
|
||||
// shader 01bef64ec0cccd53 // cloud vs
|
||||
const float resXScale = <?=$scaleFactorX?>;
|
||||
const float resYScale = <?=$scaleFactorY?>;
|
||||
|
||||
uniform ivec4 uf_remappedVS[1];
|
||||
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||
layout(binding = 32) uniform sampler2D textureUnitVS0;
|
||||
layout(location = 0) in uvec4 attrDataSem0;
|
||||
layout(location = 1) in uvec4 attrDataSem1;
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
float gl_PointSize;
|
||||
};
|
||||
layout(location = 1) out vec4 passParameterSem1;
|
||||
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;
|
||||
R0i.y = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[0].z)/resXScale));
|
||||
R0i.y = floatBitsToInt(intBitsToFloat(R0i.y) / 2.0);
|
||||
PS0i = R0i.y;
|
||||
R3i.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
|
||||
PV0i.x = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[0].w)/resYScale));
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(PV0i.x) / 2.0);
|
||||
R0i.z = R0i.y;
|
||||
R127i.w = floatBitsToInt(float(R3i.x));
|
||||
PS0i = R127i.w;
|
||||
// 1
|
||||
R0i.w = PV0i.x;
|
||||
R127i.z = floatBitsToInt(float(R3i.y));
|
||||
PS1i = R127i.z;
|
||||
// 2
|
||||
PS0i = floatBitsToInt(1.0 / intBitsToFloat(R127i.w));
|
||||
// 3
|
||||
R3i.x = floatBitsToInt((-(intBitsToFloat(PS0i)) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R2i.x)));
|
||||
PV1i.x = R3i.x;
|
||||
PS1i = floatBitsToInt(1.0 / intBitsToFloat(R127i.z));
|
||||
// 4
|
||||
R0i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.x),intBitsToFloat(uf_remappedVS[0].x)*resXScale) + 0.5));
|
||||
R3i.y = floatBitsToInt((-(intBitsToFloat(PS1i)) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R2i.y)));
|
||||
PV0i.y = R3i.y;
|
||||
// 5
|
||||
R0i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.y),intBitsToFloat(uf_remappedVS[0].y)*resYScale) + 0.5));
|
||||
// export
|
||||
passParameterSem1 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), intBitsToFloat(R0i.w));
|
||||
// export
|
||||
passParameterSem0 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.z));
|
||||
}
|
Loading…
Reference in New Issue
Block a user