add game&rawdata
This commit is contained in:
parent
0133cd976c
commit
49b34b5546
45731 changed files with 709831 additions and 0 deletions
26
gamedata/shaders/d3d11/fluid_edge_detect.vs.hlsl
Normal file
26
gamedata/shaders/d3d11/fluid_edge_detect.vs.hlsl
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#include "fluid_common_render.hlsli"
|
||||
|
||||
// Vertex
|
||||
// A full-screen edge detection pass to locate artifacts
|
||||
VS_OUTPUT_EDGE main(VS_INPUT input)
|
||||
{
|
||||
VS_OUTPUT_EDGE output = (VS_OUTPUT_EDGE)0;
|
||||
output.position = float4(input.pos, 1);
|
||||
|
||||
float2 texelSize = 1.0 / float2(RTWidth, RTHeight);
|
||||
float2 center = float2((input.pos.x + 1) / 2.0, 1.0 - (input.pos.y + 1) / 2.0);
|
||||
|
||||
// Eight nearest neighbours needed for Sobel.
|
||||
output.textureUV00 = center + float2(-texelSize.x, -texelSize.y);
|
||||
output.textureUV01 = center + float2(-texelSize.x, 0);
|
||||
output.textureUV02 = center + float2(-texelSize.x, texelSize.y);
|
||||
|
||||
output.textureUV10 = center + float2(0, -texelSize.y);
|
||||
output.textureUV12 = center + float2(0, texelSize.y);
|
||||
|
||||
output.textureUV20 = center + float2(texelSize.x, -texelSize.y);
|
||||
output.textureUV21 = center + float2(texelSize.x, 0);
|
||||
output.textureUV22 = center + float2(texelSize.x, texelSize.y);
|
||||
|
||||
return output;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue