Genebris Posted December 9, 2016 Share Posted December 9, 2016 Material with Z-sort enabled works incorrectly when rendered to a texture. See the screenshot. Green and grey materials are regular, blue mat has z-sort enabled. Right part of the image is rendered normally, left part is rendered to a texture and drawn on the context. You can see that blue cube on the left is visible through the grey cube. I need to have z-sort enabled for my particles with UV animation, but it makes them visible through the walls. Script on the camera in this scene: function Script:Start() self.tex = Texture:Create(512,512) self.cam = Camera:Create() self.cam:SetRenderTarget(self.tex) end function Script:PostRender(context) context:SetBlendMode(Blend.Alpha) context:DrawImage(self.tex,-180,0,512,512) end 1 Quote Link to comment Share on other sites More sharing options...
Genebris Posted December 22, 2016 Author Share Posted December 22, 2016 Same happens when using buffer like this: http://leadwerks.wikidot.com/wiki:render-to-texture-security-cam Is it a bug? Josh, can you look into it? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.