-
-
Save Nukem9/a3e74fdb744dc24ce030ee4dbd17e1eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Water | |
// TechniqueID: 0x4805 | |
// Input flags: 0x84210000F0000FF | |
// | |
// Technique: Vc_Refl_LOD | |
// Dynamic buffer: Size = 16 (0x10) | |
cbuffer PerGeometry : register(b0) | |
{ | |
float4 QPosAdjust : packoffset(c0); // @ 0 - 0x0000 | |
} | |
// Dynamic buffer: Size = 96 (0x60) | |
cbuffer PerMaterial : register(b1) | |
{ | |
float4 VSFogParam : packoffset(c0); // @ 0 - 0x0000 | |
float4 VSFogNearColor : packoffset(c1); // @ 4 - 0x0010 | |
float4 VSFogFarColor : packoffset(c2); // @ 8 - 0x0020 | |
float4 NormalsScroll0 : packoffset(c3); // @ 12 - 0x0030 | |
float4 NormalsScroll1 : packoffset(c4); // @ 16 - 0x0040 | |
float4 NormalsScale : packoffset(c5); // @ 20 - 0x0050 | |
} | |
// Dynamic buffer: Size = 224 (0xE0) | |
cbuffer PerTechnique : register(b2) | |
{ | |
float4x4 World : packoffset(c0); // @ 0 - 0x0000 | |
float4x4 PreviousWorld : packoffset(c4); // @ 16 - 0x0040 | |
float4x4 WorldViewProj : packoffset(c8); // @ 32 - 0x0080 | |
float4 ObjectUV : packoffset(c12); // @ 48 - 0x00C0 | |
float4 CellTexCoordOffset : packoffset(c13); // @ 52 - 0x00D0 | |
} | |
// ---- Created with 3Dmigoto v1.2.65 on Tue Oct 31 00:21:31 2017 | |
#define cmp - | |
void main( | |
float4 v0 : POSITION0, | |
float4 v1 : COLOR0, | |
out float4 o0 : SV_POSITION0, | |
out float4 o1 : COLOR0, | |
out float4 o2 : TEXCOORD0, | |
out float4 o3 : TEXCOORD1) | |
{ | |
float4 r0,r1; | |
uint4 bitmask, uiDest; | |
float4 fDest; | |
r0.xyz = v0.xyz; | |
r0.w = 1; | |
r1.z = dot(WorldViewProj[2].xyzw, r0.xyzw); | |
r1.w = -70000 + r1.z; | |
r1.w = max(0, r1.w); | |
r1.w = 9.99999975e-005 * r1.w; | |
r1.w = min(1, r1.w); | |
o0.z = r1.w * 0.5 + r1.z; | |
r1.x = dot(WorldViewProj[0].xyzw, r0.xyzw); | |
r1.y = dot(WorldViewProj[1].xyzw, r0.xyzw); | |
o0.xy = r1.xy; | |
r1.x = dot(r1.xyz, r1.xyz); | |
r1.x = sqrt(r1.x); | |
r1.x = saturate(r1.x * VSFogParam.y + -VSFogParam.x); | |
r1.x = log2(r1.x); | |
r1.x = NormalsScale.w * r1.x; | |
r1.x = exp2(r1.x); | |
r1.x = min(VSFogFarColor.w, r1.x); | |
o0.w = dot(WorldViewProj[3].xyzw, r0.xyzw); | |
r1.yzw = VSFogFarColor.xyz + -VSFogNearColor.xyz; | |
o1.xyz = r1.xxx * r1.yzw + VSFogNearColor.xyz; | |
o1.w = r1.x; | |
r1.z = dot(World[2].xyzw, r0.xyzw); | |
r1.x = dot(World[0].xyzw, r0.xyzw); | |
r1.y = dot(World[1].xyzw, r0.xyzw); | |
r0.x = dot(r1.xyz, r1.xyz); | |
o2.xyz = r1.xyz; | |
r1.xyzw = QPosAdjust.xyxy + r1.xyxy; | |
r1.xyzw = r1.xyzw / NormalsScale.xxyy; | |
o2.w = sqrt(r0.x); | |
r0.x = cmp(0 != ObjectUV.x); | |
r0.xyzw = r0.xxxx ? float4(0,0,0,0) : r1.xyzw; | |
o3.xyzw = NormalsScroll0.xyzw + r0.xyzw; | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment