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
render.Clear sets alpha incorrectly for upcoming surface calls in a rendertarget #2085
Comments
AFAIK @UnderscoreKilburn said that there will always be problems with transparency and render targets. |
is there any work arounds? i kind of want to use transparency |
I believe this is what you want? http://wiki.garrysmod.com/page/render/OverrideAlphaWriteEnable There's an example in http://wiki.garrysmod.com/page/render/PushRenderTarget Although if I remember correctly you also need to create the render target with some other flags, but give it a try anyway. |
I figured that out after a while, but yes. |
Did you eventually figure out which flags to use, @meepdarknessmeep? |
Also running into issues with this. All my testing has proved fruitless. I tried everything I could think of... I tried both GetRenderTarget and GetRenderTargetEx, and neither worked. When using GetRenderTargetEx, I tried all sorts of flags and settings without success. I even followed the example shown at the bottom of the documentation for the render.PushRenderTarget function or method or whatever the heck it's called in Lua. I'm not sure if it has to do with render context or not, but the few tests I tried weren't successful. Here's my code for making the texture:
I used the PreDrawEffect hook to execute the following every frame:
No matter what I do, I still get the same result. It's like there isn't an alpha channel at all or it's not being set right:
All I want to do is blit one render target to another using the standard alpha compositing operation, but nothing I do seems to work. |
for example,
this will draw the rectangle with color
255,255,255,(200/255)*100
i am assuming that it should however set the color of the whole rendertarget at black with 100 alpha
then let the surface calls that are upcoming do whatever color they want
The text was updated successfully, but these errors were encountered: