i found this code
so,
i dont know why “on <= ES3_1 separate translucency requires HDR on and MSAA off”
and whats the relation between “Render after DOF” and “MSAA”
Please
i found this code
Please
because you can’t resolve depth with MSAA on most OpenGL ES 3.1 devices. you can render opaque and masked objects with an additional texture with MSAA on, and end pass after rendering opaque and masked objects, then start a separated pass with no-MSAA SceneColor and no-MSAA SceneDepth to render translucent objects, at the beginning of the translucent pass use resolved additional scene color texture as input, draw a full screen rect using a shader with SV_DEPTH and SV_TARGET output, and output RGB and A Chanel witch contains the device depth. remember the SceneDepth is not MemoryLess, and the depth action in the translucent pass need to be DontLoad_Store.
Now you can remove (!bMobileMsaa) condition, render after DoF pass will just work fine!
It may increase your gpu bandwidth, I don’t recommended it. Turn off MSAA and use software anti-alising may be a better solution.
thansk,i know why MSAA cant use the SceneDpeth on <= ES3_1 ,
this means that translucent cant be rendered
in fact, if somebody use MSAA that he must create a cumstom depth
wait…
translucent no need scene depth texture because no write depth
so?i dont know why msaa can effect rendering translucent
This topic has been moved from International to Programming & Scripting: C++.
When posting, please review the categories to ensure your topic is posted in the most relevant space. Hopefully, this category change will help to get a solution to your question.
In the meantime, good luck and happy developing!
translucent DO need scene depth texture, they usually don’t WRITE depth, but they need do depth-test.