simple question

  • againstallathority
  • Topic Author
More
8 years 11 months ago #1 by againstallathority simple question was created by againstallathority
found this equation in main reshade.fx file in vertex:
	OUT.txcoord.x = (IN.id == 2) ? 2.0 : 0.0;
	OUT.txcoord.y = (IN.id == 1) ? 2.0 : 0.0;
	OUT.vpos = float4(OUT.txcoord * float2(2.0, -2.0) + float2(-1.0, 1.0), 0.0, 1.0);

can you, guys, explain me what we are doing here? why we check vertex ID in postprocess? i assume its always same quad - the output screen...
each line commend will be apreciated!

Please Log in or Create an account to join the conversation.

  • crosire
More
8 years 11 months ago #2 by crosire Replied by crosire on topic simple question
Here's a full explanation: www.reddit.com/r/gamedev/comments/2j17wk...vertex_shader_trick/

ReShade doesn't provide any positions etc. to the shaders, it simply renders a single triangle, what you do with that triangle and where you put it is your choice and done in the vertex shader.
The following user(s) said Thank You: againstallathority

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.