Search the Community

Showing results for tags 'Shader'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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
    • Feeback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • Showcase
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 19 results

  1. Outline shader without depth test

    Hi, we are developing a border detection/outline shader that renders the border of a mesh over any other objects in the scene. Some other post ask for similar effects but none came up with a final solution: Sample post_selection_00 is the kind of effect that we need to achieve but r
  2. Hello, I just installed Unigine on Linux and followed this tutorial step by step to create a custom material with a deferred pass shader. I don't get any compilation errors. I assigned the custom_mesh_material to a cube and it is not rendering (as in the sceenshot bellow): Is there something I have missed? Thanks in advance
  3. Supersampling information in shader

    Hello, is there any uniform which can be accessed to get supersampling scaling value in the geometry shader? Did not find it in the documentation. Thanks
  4. Hello together, I try to change the indices of an ObjectDynamic during runtime to discard some points in Unigine 2.11. I can call clearIndices() on this object and all geometry vanish. But when I change the index array and set it again. the changed data won't get uploaded and the geometry still looks the same. Any ideas? int AppWorldLogic::init() { // Write here code to be called on world initialization: initialize resources for your world scene during the world start. m_dynamicObject = Unigine::ObjectDynamic::create(); m_dynamicObject->setMaterialNodeType(Unigi
  5. I try to recreate a shader like the sample on on the sample is use a vertex point as geometry in. Using UUSL the GEOM_TYPE_IN. How I can put a POINT or a Vertex?, for now my two valid options are GEOM_TYPE_IN(LINE_IN) or GEOM_TYPE_IN(TRIANGLE_IN) I try parameters like VERTEX_IN, POINT_IN etc but all of then give me "error X3000: unrecognized identifier" VERTEX_IN or POINT_IN In fact if you do a search on all your documentation for GEOM_TYPE_IN shader definitio
  6. [SOLVED] Trying to do a shader

    I been try to do a point cloud using "deferred" pass material, and I'm been testing differents option. For sample this sample if I put a material as "particles" work fine, I found a particle implementation shaders with the shader for "geometry, vertex and fragment" on ambient and don't work, I try many samples I found on the forums and don't work on my side. I try to modify that I been testing and I don't get nothing yet. The only shader I get running was using a UUSL for other a "object_mesh_static" node, but nothing yet for a "object_dynamic". In the HELP documentation only I found two re
  7. Hi, we are writing a custom deferred shader and we want to supply the normal in World Space, not Tangent Space. How can we achieve this? We do not want the value we supply in gbuffer.normal to be interpreted as if it was in Tangent Space. /roberto
  8. Problems on tessellation shader

    Hi: I had tried some access to the tessellation shader and it didn't work. My code had been uploaded so that you check out where the problem is, or can you offer some examples on how to develop tessellation shader in Unigine? thanks~ tessellation_test.rar
  9. Problems on ObjectMeshCluster and Shader

    In order to access each mesh of in the ObjectMeshCluster, we are marking each mesh in the cluster with an ID. And the ID is passed into the shader by buffer or texture. In the shader, we use IN_INSTANCE to find the corresponding ID. But in the practice, we found the ID is changed by the visible count of the mesh. How can we get the right ID like using s_clutter_cluster_instances in the shader?
  10. How to make TAA not applying on Auxiliary

    Hi, we have some cool effects such as Outline, Highlight, Border Detection... in post shaders that require auxiliary buffer. We now need combining these effects at the same time but we only have one auxiliary texture so we tried to set alpha channel like a kind of mask for each effect/object combination (like viewport mask). Shaders will check alpha channel of auxiliary buffer and if it does match their 'mask', they will make the effect using auxiliary RGB channels. When 'masks' fit the effect works fine, but when they do not, some artifacts can be seen. After investigating we realized th
  11. Terrain&Shader

    I have some questions about the Unigin. 1) The content of this web page is a description of the features implemented in Unity3D. I need the same features for our project. So I would like to know Unigin 2.6.1 provides similar functionality. 2) And how can I use this features in teraain, if Unigin 2.6.1 includes this functions. 3) Finally, please let me know how to apply shader to teraain in Unigine.
  12. Hi ! I've got a problem with drawing ObjectDynamic in lines with simple shader. My goal is to connect several points in world with solid lines. The good practice for this issue is ObjectDynamic class. It can de drawn in lines. I've create a new empty project and made a couple chages (remove material ball and switch sun scaterring mode to "moon"). ObjectDynamic is constructed in AppWorldLogic. There are only 3 points added to ObjectDynamic to make a triangle. Surface mode is set to MODE_LINES. AppWorldLogic.h #include <UnigineObjects.h> using namespace Unigine; class AppWo
  13. How would I go about implementing a "flat shaded" mesh material? By flat shading, I mean the mesh should be subject to world lighting, however triangles should be rendered as if all pixel normals are set to the face normal (e.g. for a retro-graphics look with hard-edged triangles). The "brute force" method of achieving this is to duplicate all vertices in the mesh, such that no vertices are shared. Then the three normals for each triangle can be set to the face normal by taking the cross-product of two of the edges. This is not ideal however, since it results in redundant vertex data.
  14. Hi, all. I am working on a VR/MR project. I had to replace scene image by another image shot by a camera. I was trying creating a custom shader for post-processing to do this. The image on the PC monitor is OK but unfortunately VR headset showed double/overlapped images. e.g. You can take the Post-processing UUSL example provided by Unigine. And add a texture assigned a local picture in the material and then output the RGB color of this texture to replace the scene image in the frag shader. Anyone knows the reason or solution? Please help me find out it. thanks!
  15. Shader Toy has lots of great WebGL shaders. As a test, I ported this one to UUSL. It's a barrel distortion with chromatic abberation. Lessons learned; Use shaders_reload Use EXPORT_SHADER(foobar) to dump out the preprocessed shader in to foobar.hlsl or foobar.glsl so you can match up the error line numbers Search+Replace of vec3 etc gets you surprisingly far. Valid GLSL things like foo = float3(0.0) break when using HLSL. Expand them as foo = float3(0.0, 0.0, 0.0) and they'll work for both Virtually all maths in ShaderToy code comes over with
  16. We've been experiencing a bug for a while where our tree billboards would flicker black in a really obnoxious way, that looked a lot like z-fighting. Recently though I've tracked it down and discovered that it isn't caused by z-fighting after all. We assumed it was so dark because it was caused by shadowed billboards being sorted incorrectly and showing up in front of other trees, but it's actually a problem with alpha testing not working properly. The first attached image shows this problem manifesting itself in a line. This is the point where the juniperoxy billboard intersects the willow b
  17. I am trying to create a custom vertex, geometry and fragment shader. I would like to pass in a float texture and an rgb color texture every frame but am running into some problems. I have tried updating a meshImage with new test texture data every frame before passing it off to the vertex shader. In my vertex shader, the output of the value returned in the texture will pass through the geometry shader and the fragment shader before rendering a color (following the meshLines sample). Seems like my texture ("depthTexture") in the vertex shader is never set when I use material->setImag
  18. Hi, I was wondering if there are any examples of programmatically creating a shader, and more specifically, passing in a custom 4x4 matrix array to a shader? I see examples of vec4s throughout material examples, e.g. <parameter name="normal_transform" type="expression" shared="1">vec4(1.0f,1.0f,0.0f,time)</parameter> Are there any tips or examples that you can point me to do this? I have a 4x4 custom matrices (projection, rotation & translation) that I would like to pass into a shader that are generated only at runtime. Thanks!
  19. Hi, I think it would be quite handy to have a saturation/desaturation option for each material for the final appearance, between the actual color as it is rendered and a grey value. Maybe it as well could be extrapolated towards a higher saturation. Like (0<-1(as it is)->2). We had implemented this option for our shaders using our previous engine. It is very handy when it comes to bringing together many scene elements, as the composition of the final image is much easier and more pleasing. Best. Werner