1.10 param_named_auto light_position error

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

1.10 param_named_auto light_position error

Post by mkultra333 »

Updating a project from 1.8 to 1.10, using DX9. Got something weird going on in a shader, exact same code works fine in 1.8 but has problems in 1.10.

It is in a complicated part of the rendering that adds lighting and shadows to glass. Part of the code depends on the world position of the spotlight, updated via

param_named_auto LampPos light_position 0 in both vertex and fragment material,
uniform float4 lightPos0, in the hlsl code.

It appears the the position becomes messed up for some meshes, and this while other meshes with exactly the same material render fine. It's all rendered in the same update call.

Here's a look at the scene in game.
Image

Here is a separate render of just the meshes involved. I've tinted them green depending on the light's world position input. If it goes bright green, that's an error.

All ok from one angle:
Image

But as I slowly turn the camera, different meshes start getting messed up world positions.
Image
Image
Image

What could be the problem?
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: 1.10 param_named_auto light_position error

Post by mkultra333 »

Is there a way I can force all the param_named_auto parameters to update, so I can check if this is the issue?

Like I said, it seems to be failing in between meshes with the same material rendered in the same update call.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: 1.10 param_named_auto light_position error

Post by mkultra333 »

I get the feeling I may as well be yelling into a void as far as 1.10 is concerned. I'm on my own. (*feels all Mad Max-y, stiffens resolve*)
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: 1.10 param_named_auto light_position error

Post by mkultra333 »

Definitely seems to be something wrong with the param_named_auto light settings not updating or being set wrong. I changed the shader to manually update the light parameters via custom shader inputs and it works fine.

I don't use normal Ogre logic for lighting, my system is a million miles from the standard Ogre system. I use a single light and a single camera, and I move them around as I render each light. Looks like something changed between 1.8 and 1.10 that doesn't like that method and behaves erratically.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
Post Reply