Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upfeat: Add texture animation #641
Conversation
jojolepro
reviewed
Apr 13, 2018
I went through quickly and it seems good. Will do a full review later (but don't wait on me to merge if everything is fine)
azriel91
referenced this pull request
Apr 15, 2018
Merged
Feature/634/sprite rendering and animation #638
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
azriel91
Apr 15, 2018
Contributor
The flat passes haven't got buffers set up for the texture offsets, and using Material animation using DrawFlat (and probably DrawFlatSeparate) gives an error:
Buffer update for effect failed! Buffer not found: "AlbedoOffset"
I got around it in #638 by calling setup_textures(&mut builder, &TEXTURES);, though I don't know where TEXTURES comes from, and whether I should've just created an "AlbedoOffset" buffer instead.
|
The
I got around it in #638 by calling |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Apr 15, 2018
Member
Ah, that was a miss from an earlier PR, all passes should call setup_textures, the Flat ones didn't, apparently.
|
Ah, that was a miss from an earlier PR, all passes should call setup_textures, the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Fixed now. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I'll check later today if I get time |
| + Offset((f32, f32), (f32, f32)), | ||
| +} | ||
| + | ||
| +impl InterpolationPrimitive for MaterialPrimitive { |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jojolepro
Apr 17, 2018
Collaborator
I'm not too sure I understand the point of adding a trait if you just panic on all functions..?
jojolepro
Apr 17, 2018
Collaborator
I'm not too sure I understand the point of adding a trait if you just panic on all functions..?
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Apr 17, 2018
Member
Because of the trait bound on the interpolation functions in minterpolate that we use. I will implement these for some of the variants later on. For now we can only use step interpolation that won't actually call any of the functions
Rhuagh
Apr 17, 2018
Member
Because of the trait bound on the interpolation functions in minterpolate that we use. I will implement these for some of the variants later on. For now we can only use step interpolation that won't actually call any of the functions
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| @@ -101,8 +101,12 @@ pub(crate) fn set_light_args( | ||
| pub(crate) fn setup_light_buffers(builder: &mut EffectBuilder) { | ||
| builder | ||
| .with_raw_constant_buffer("FragmentArgs", mem::size_of::<FragmentArgs>(), 1) | ||
| - .with_raw_constant_buffer("PointLights", mem::size_of::<PointLight>(), 128) | ||
| - .with_raw_constant_buffer("DirectionalLights", mem::size_of::<DirectionalLight>(), 16) | ||
| + .with_raw_constant_buffer("PointLights", mem::size_of::<PointLightPod>(), 128) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jojolepro
Apr 17, 2018
Collaborator
Can't this be user defined? (out of the scope of this PR, I assume?)
jojolepro
Apr 17, 2018
Collaborator
Can't this be user defined? (out of the scope of this PR, I assume?)
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jojolepro
Apr 17, 2018
Collaborator
https://computergraphics.stackexchange.com/questions/5323/dynamic-array-in-glsl?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
It appears that what I was thinking of doesn't work.
jojolepro
Apr 17, 2018
Collaborator
https://computergraphics.stackexchange.com/questions/5323/dynamic-array-in-glsl?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
It appears that what I was thinking of doesn't work.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
bors r+ |
Rhuagh commentedApr 13, 2018
•
edited
Edited 5 times
-
Rhuagh
edited Apr 13, 2018 (most recent)
-
Rhuagh
edited Apr 13, 2018
-
Rhuagh
edited Apr 13, 2018
-
Rhuagh
edited Apr 13, 2018
-
torkleyy
edited Apr 13, 2018
Supports swapping textures (using indexing into a
MaterialTextureSetresource) and modifying offset into a texture.The PR also adds support for targeting parts of a texture, using a
Materialdefined offset.Material only support the
Stepinterpolation function, all other functions will result in a panic (except possibly a user supplied function).This change is