Jump to content

Search the Community

Showing results for tags 'stencil'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to UNIGINE Forums
    • News & Announcements
    • Getting started
  • Development
    • Content Creation
    • World Design
    • Rendering
    • Animation
    • Physics, Navigation and Path Finding
    • UI Systems
    • Sound & Video
    • Editor
    • C++ Programming
    • C# Programming
    • Networking
    • Sim IG (Image Generator)
    • VR Discussions
    • General
  • Improving UNIGINE
    • Documentation
    • Feedback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Add-on Store (https://store.unigine.com/)
    • Showcase
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 3 results

  1. Stencil Buffer usage while rendering to texture.

    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?
  2. Hi, I'm trying to use WidgetSpriteVideo to display video on in-game screen models and it works pretty fine. However, I can't have the video cropped properly. As I show on my screenshot, I'd like the right part of the video not being displayed. I've made some research, found this topic and tried to do the same. Here is the code in which I try to create my WidgetSpriteVideo and attach it to my GuiObject: // gui: Gui of my ObjectGui WidgetHBox container = new WidgetHBox(gui); container.setStencil(1); WidgetSpriteVideo videoSprite = new WidgetSpriteVideo(gui, "MyVideo.ogv", 0); videoSprite.setFlags(GUI_ALIGN_OVERLAP); container.addChild(videoSprite); gui.addChild(container); What am I missing? Thanks, Alexandre.
  3. Hey Unigine, stencil isn't working for sprites. <hbox stencil="1" width="10" export="1" name="statusbarLayer"> <sprite texture="imagepath.png"/> </hbox> If I'm using a label: <hbox stencil="1" width="10" export="1" name="statusbarLayer"> <label><text>012345678910111213</text></label> </hbox> it work's neither. (updated) In my opinion thats a bug isn't it? PS: I tried to set the align in texture like: align="expand" etc. and it didn't work aswell. Greetings Lars
×
×
  • Create New...