-
-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null pointer when setting Mip LOD Bias #255
Comments
From what I can tell your shader doesn't have any references to MIPMAPLODBIAS... my guess is these values are all just nonsense; I base this mostly on my attempt to parse a binary version of that shader:
Looks like you've still got nested structs: https://github.com/FNA-XNA/MojoShader/blob/fna/mojoshader_effects.c#L374 This is more of a MojoShader issue than FNA, so I've filed an issue over there for you: icculus/mojoshader#8 |
Oh, it's even better than that, it's actually a struct with multidimensional parameters, which apparently didn't have a pleasant layout last time I looked at it (float4x4 rather than float4). Still roughly the same area to look at for fixes. |
OK, I can try adjusting my shaders to see if that fixes this, or I can just see if I can fix this layout issue as well. |
The hg diff in the MojoShader issue seems to produce the correct struct size, so as long as the matrices don't need to be transposed at CommitChanges for some reason (SetValueMatrix should be doing that, right?) then this will be a quicker fix than expected, at least for matrices. |
That's great. I don't actually see any nested structs in this shader's source so I bet it was just that diff. |
Also discovered our LODBIAS friend in the headers... https://github.com/sq/Fracture/blob/master/Squared/RenderLib/Shaders/BitmapCommon.fxh#L26 The parser appears to pull this in just fine:
Texture "2" being the object index for the "BitmapTexture" mapping and MIPMAPLODBIAS correctly printing the value (I threw in some arbitrary values and it was correct each time). |
That makes sense. If it's incompatible I can pull it out of the sampler and set it in code, anyway. |
GUESS WHO'S FIRED TODAY ᵐᵉᵉᵉᵉᵉᵉᵉᵉᵉᵉ |
states[i].value.values
is NULL. It's a texture sampler. The name and semantic are also NULL. This is in EffectPass.Apply. The technique isScreenSpaceBitmapWithLUTTechnique
from https://github.com/sq/Fracture/blob/master/Squared/RenderLib/Shaders/SquaredBitmapShader.fxThe text was updated successfully, but these errors were encountered: