I’ve hit an odd-seeming issue: on a particular object that uses multiple texture stages, calling “setSavedResult” (so that I can use the result of that stage after the next stage) seems to result in the output of that stage being different to the output when “setSavedResult” is not called. This is… unexpected. o_0
Relevant-seeming excerpts:
# In my initialisation method:
skyStageMask = TextureStage("sky mask")
skyStageMask.setSort(5)
skyStageMask.setColor(Vec4(0.01, 0.02, 0.1, 1))
skyStageMask.setCombineRgb(TextureStage.CMInterpolate,
TextureStage.CSPrimaryColor, TextureStage.COSrcColor,
TextureStage.CSConstant, TextureStage.COSrcColor,
TextureStage.CSTexture, TextureStage.COSrcColor)
skyStageMask.setSavedResult(True) #### <-- Call to setSavedResult
skyStageStarAddition = TextureStage("sky star addition")
skyStageStarAddition.setSort(10)
# I'm temporarily using CMReplace here to better highlight the effect
skyStageStarAddition.setCombineRgb(TextureStage.CMReplace,
TextureStage.CSPrevious, TextureStage.COSrcColor)
mask = loader.loadTexture("sky_mask.png")
stars = loader.loadTexture("sky_stars.png")
self.sky.setTexture(skyStageMask, mask)
self.sky.setTexture(skyStageStarAddition, stars)
# Elsewhere, updated via a task:
## <calculate a value (a Vec4, specifically) for "skyColour"
# Set the sky's colour
self.sky.setColor(skyColour)
When the above call to “setSavedResult” is commented out, I get something like this:
When the call is left in, I get something like this:
Note that the gradient has disappeared.
I’m doing this on Ubuntu 13.10, using a home-built copy of Panda from the CVS repository (1.9, I believe).
Does anyone know what might be going wrong (whether mistake on my part, issue with my graphics card or drivers, bug in TextureStage or otherwise)? Otherwise, has anyone seen something like this?