Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

[SOLVED] Array'ed effect parameters are not working.

$
0
0

@oblivion165 wrote:

I am finally able to convert my engine over to Monogame after waiting years for VertexBufferBindings to be added so thank you so much for that! I am having problems with my light rendering shader. This of course works as intended in XNA 4.0 but it almost seems like the shader has no data when it's actually running on the card.

Pausing the code while running lets me peak at the data currently in the parameters and they are correct. I have 1 light enabled and it has a range of 10, a color of blue, and is located at 0,2,0.
(22-25)

At the top of my HLSL file.

The code itself.

The problem I am having is that it appears that all the array entries are actually null/0 even though the debugger says they have the correct information. Light_Enabled always equals false, Light_Range always equals 0 etc. Even if I tell my PS to return Light_Color[0], it returns 0,0,0,0.

I am using MonoGame 3.6 on a GTX 1070 with the latest drivers. Windows DirectX application. PS 5_0, VS 5_0

Just to make sure I wasn't going crazy, I removed the array and just made it 1 standard light. It works correctly.

Posts: 10

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles