Search the Community
Showing results for tags 'Buffer'.
-
Velocity buffer not updated for moving objects only for camera
sebastian.vesenmayer posted a topic in C++ Programming
Hello, I wanted to print the velocity vectors in the shader, it works in the editor but not in our application. I also activated the material->setState("deferred", 1); which is mandatory for the vlocity vectors. I only see the camera movement nvelocity vectors. Is there any other engine setting which does not trigger velocity buffer generation? Thanks -
Hello, is it possible to do a stencil test while rendering to a 2d texture. This is my example code: camera->setModelview(Unigine::Math::inverse(m_player->getWorldTransform())); // saving current render state and clearing it Unigine::RenderState::saveState(); Unigine::RenderState::clearStates(); Unigine::RenderState::clearBuffer(Unigine::RenderState::BUFFER_STENCIL, Unigine::Math::vec4(), 0.f, 1); Unigine::RenderState::setStencilFunc(Unigine::RenderState::STENCIL_EQUAL, Unigine::RenderState::STENCIL_KEEP, 2); Unigine::RenderState::flushStates(); // rendering an image from the camera to the texture viewportwide->renderTexture2D(camera, texture); // restoring back render state Unigine::RenderState::restoreState(); The stencil function I use should skip filling the texture, but it still works. What am I doing wrong?
-
Enabled / Disable auxiliary state performance.
sebastian.vesenmayer posted a topic in C++ Programming
Hello, we did observe that when we are changing the material of an ObjectMeshStatic, it will lose its auxiliary state information during runtime. We are using the aux buffer for outlining objects, but changing the material will disable the outlining. We did a workarround for this and did restoring the auxiliary state when the material changes. We did a profile run and did observe: restoring the auxiliary state takes always a lot of time until the function will return. So every time a material changes on an object the application halts for a noticeable time. Do you have a simple solution for that, that does not cost any extra ressources and time on CPU/GPU side? We are on 2.8 Unigine version using opengl. Thanks a lot. -
[SOLVED] Auxiliary buffer is doing depth test since 2.7.3 which results in Z Fighting
sebastian.vesenmayer posted a topic in Bug Reports
Hi, I just port our project from 2.7.2 to 2.7.3 and discovered that the auxiliary buffer is doing a depth test now. My material is set to disable depth test and depth mask to prevent depth testing and writing so I can write all pixel in the auxiliary buffer to do the outlining with a sobel later. It worked without problems in 2.7.2.. Is there a workarround without offsetting the geometry from the ground plane? Sample code and video is in the attachement. Thanks, Sebastian source.zip UNIGINE Engine 11.01.2019 11_34_19.mp4 -
Hi, is it possible to resize the auxiliary buffer, it has a much more smaller resolution as the actual scene when I use it (about 8x)? I want to do a very high detailed outlining but it looks very blocky. I am using your sobel filter for edge detection. In the Attachement is a FULLHD resolution image from current state. Thanks, Sebastian
-
[SOLVED] terrain.usc needs to be updated for 2.0 beta2
helmut.bressler posted a topic in Bug Reports
Hello, I just discovered that the update script terrain.usc is still using the old Buffer class, which has been renamed to Blob in unigine 2.0 beta2. Replacing 'Buffer' by 'Blob' fixes the issue. cheers Helmut