Actually it is only possible to pass float properties to a 2D filter (GLSL fragment shader).
This patch allows also to use integer properties for the 2D filter.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
As usual, I'm not a fan of silently failing, which happens if the property is not found. However, the old code also silently failed, so I don't think that is a blocking issue for this patch.
What happens if you declare a float in the shader, but then use an integer property? Will there be a failure? If so, are we concerned about breaking existing projects?
| source/gameengine/Rasterizer/RAS_2DFilterManager.cpp | ||
|---|---|---|
| 269 | This is a minor nitpick, but I'd prefer to not declare variables in the middle of a scope. I also don't really see the point of storing the result of property->GetValueType() when we could do switch (property->GetValueType()) {And it still looks fine. | |