Quantcast
Channel: Questions in topic: "hlsl"
Viewing all articles
Browse latest Browse all 206

Defining extra vertex data in image effect shader v2f struct?

$
0
0
In the vertex to fragment struct of this image effect shader, I want to add a float3 that represents the direction between the camera and the vertex. But I'm still new to shaders so I don't really know how I would do the semantics for this. Any ideas? struct v2f { float2 uv : TEXCOORD0; float4 vertex : SV_POSITION; float3 viewVector; //Kicks out an error saying shader is not supported on this GPU. }; I guess this is also a question about how to get the world space vertex position into the fragment shader because that's what I was trying to do with this.

Viewing all articles
Browse latest Browse all 206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>