0 answers · asked @ video mark 0:00 · Lesson: Adding Textures · Course: Shader School

SV_TARGET doesn't it affect the output of fragment shader not the input as mentioned in the video?


In the video you say "this allows to get the color from the texture and use it for our frag function" (something similar). I thought that those Binding Semantics are directed at return value not the input value? 

On a Unity forum I read "SV_Target is the semantic used by DX10+ for fragment shader color output. "

The documentation also states that it affects the output value:

SV_Target[n], where 0 <= n <= 7    The output value that will be stored in a render target. The index indicates which of the 8 possibly bound render targets to write to. The value is available to all shaders.

Could you clarify what does it mean exactly?