C
Charlie Brown 1001
Guest
Hi everybody,
I playing around with a Visual C++ UWP and regarding to the mass of forums I hope Ive chosen the right one !
I wrote a Vertex and Pixel Shader in HLSL and had to transfer a bool variable from Vertex Shader to Pixel Shader.
( In Detail: This bool describes if a pixel is part of a thick line and has to become marked red )
I declared instead of a bool ( I did not find one in HLSL ) a float with the description: BLENDWEIGHT0 and used it with -1.0f for false and 1.0f for true.
With really confusing results: It seems as if about 50% of all pixels did not use it right ( wrong color, wrong texture ... ) - it looked horrible.
But when I transfer the test program to my laptop it looks fine.
And heres the joke: After hours and hours of graphic debugging I used instead of 1.0f and -1.0f the values 0.5f and -0.5f and it works really fine !!
Can anybody tell me what happens with a BLENDWEIGHT value in between Vertex and Pixel Shader oder in the rasterizer stage or ... ( I dont know where ) ???
Thanks,
Charlie
Continue reading...
I playing around with a Visual C++ UWP and regarding to the mass of forums I hope Ive chosen the right one !
I wrote a Vertex and Pixel Shader in HLSL and had to transfer a bool variable from Vertex Shader to Pixel Shader.
( In Detail: This bool describes if a pixel is part of a thick line and has to become marked red )
I declared instead of a bool ( I did not find one in HLSL ) a float with the description: BLENDWEIGHT0 and used it with -1.0f for false and 1.0f for true.
With really confusing results: It seems as if about 50% of all pixels did not use it right ( wrong color, wrong texture ... ) - it looked horrible.
But when I transfer the test program to my laptop it looks fine.
And heres the joke: After hours and hours of graphic debugging I used instead of 1.0f and -1.0f the values 0.5f and -0.5f and it works really fine !!
Can anybody tell me what happens with a BLENDWEIGHT value in between Vertex and Pixel Shader oder in the rasterizer stage or ... ( I dont know where ) ???
Thanks,
Charlie
Continue reading...