Jump to content

Search the Community

Showing results for tags 'uusl'.

  • 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 5 results

  1. Было очень сложно разбираться в том, как написать простой шейдер (вершинный + фрагментный) на UUSL, в базовом материале и как туда передавать данные из C++. К примеру я очень долго искал, как передать матрицу в шейдер. Я сначала нашёл про Material::setParameter но там не было матриц. Затем нашёл Shader::setParameter, но в шейдере матрица всё равно не задавалась. Только потом, я каким-то образом (уже не помню каким) узнал, что в шейдере эту самую матрицу нужно указать внутри `CBUFFER(parameters)`. Очень сильно не хватает документации и примеров, соединяющих всё воедино. Потому что пока что ориентиром является только имплементация ImGui, в которой покрываются далеко не все аспекты.
  2. Добрый день! Во всех примерах, которые я нашёл, для работы с данными используются текстуры. Метод инициализации структурного буфера: INIT_RW_STRUCTURED_BUFFER ( value NUM, value STRUCTURE, value NAME ) Из примера : // Unordered access buffers INIT_RW_STRUCTURED_BUFFER(0,DXT1Block,dxt_image) Совершенно не понятно, что это за текстура, откуда взялось имя dxt_image, и зачем какая либо текстура вообще нужна. У мелкомягких например передаётся тип буфера, имя и регистр. Если мы резервируем кусок памяти этим методом, то почему тратятся ресурсы ещё и на текстуру. Так же не нашёл как через API управлять ресурсами. К примеру для моего алгоритма критичен доступ к локальной памяти видеоадаптера. Очень хочется знать, как до неё добраться. С Уважением Константин.
  3. 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!
  4. Hello , I am writing geometry shader using UUSL, My shader works fine with opengl , but in directX it fails , because of output variable used in DirectX Suppose I do Emit Vertex in main routine like this it works in both HLSL/GLSL MAIN_GEOM_BEGIN(GEOMETRY_OUT,GEOMETRY_IN) //some code OUT_POSITION = postionLHS; OUT_DATA(1). = colorABC; EMIT_VERTEX OUT_POSITION = postionLHS; OUT_DATA(1). = colorABC; EMIT_VERTEX OUT_POSITION = postionLHS; OUT_DATA(1). = colorABC; EMIT_VERTEX END_PRIMITIVE END_GEOM But I want to create a function like CreateTriangle( int index, float offset ) { OUT_POSITION = postionLHS; OUT_DATA(1). = colorABC; EMIT_VERTEX OUT_POSITION = postionLHS; OUT_DATA(1). = colorABC; EMIT_VERTEX OUT_POSITION = postionLHS; OUT_DATA(1). = colorABC; EMIT_VERTEX END_PRIMITIVE } MAIN_GEOM_BEGIN(GEOMETRY_OUT,GEOMETRY_IN) CreateTriangle( 0, 0.25); CreateTriangle( 1, -0.25); CreateTriangle( 2, 0.50); END_GEOM Currently OUT_POSITION is not available in HLSL shader for CreateTriangle How can i pass the output arguments to CreateTriangle Routine which works in both HLSL or GLSL ?
  5. Shader Toy has lots of great WebGL shaders. As a test, I ported this one https://www.shadertoy.com/view/llK3RR 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 without changes. I have attached the material XML, vertex and fragment shaders to this message. Note that if you're adding this to your project you'll need to edit the materials XML to correct the path to the shaders. post.frag shader_dev.mat post.vert
×
×
  • Create New...