Jump to content

SpiderPig

Members
  • Posts

    2,285
  • Joined

  • Last visited

Posts posted by SpiderPig

  1. I'd like to try using these now.  Is this the way to use them? I found this here.

    //Load compute shader
    auto module = LoadShaderModule("Shaders/Compute/test.comp.spv");
    auto shader = CreateShader();
    shader->SetModule(module, SHADER_COMPUTE);
    
    //Create work group
    int workercount = 8;
    auto workgroup = CreateWorkgroup(shader, workercount, workercount, workercount);

    I couldn't find CreateWorkgroup() in the API though.

  2. Hmm, actually I don't think my normals are right... I'm multiplying the local vertex positions by a local matrix to rotate the blades but the normals are unchanged.  Can I rotate normals by multiplying by the same matrix as I do the vertices?

  3. Oh, that reminds me.  Inside that function in Lighting.glsl, RenderLight() was using the input vertexWorldPosition rather than the argument "position".

    RenderLight(lightIndex, material, materialInfo, vertexWorldPosition.xyz, normal, v, NdotV, f_diffuse, f_specular, renderprobes, ibldiffuse, iblspecular);

    I thought it should use the argument 'position' seeing as it is passed to it but not sure... I don't know if it's something the user could end up editing in the UserFunction?

  4. I'm getting mixed and seemingly random results with the lighting of my grass.  The line between light and dark moves with the camera.  This is what I'm passing out of my geometry shader to the default PBR fragment shader.  The grass is green as I'm setting the vertex color to green.  The fragment shader is just doing the lighting.  I've looked at the fragment shaders to see what it needed but might have missed something?

    layout(location = 25 ) out uint outEntityID;
    layout(location = 5 ) out flat uint outMaterialID;
    layout(location = 8 ) out vec4 outVertexPosition;
    layout(location = 1 ) out vec3 normal;
    layout(location = 7 ) out vec4 worldPosition;
    layout(location = 0 ) out vec4 vertexColor;

    First it was this;

    Grass_Lighting.thumb.png.cd21281125ffa82cdfebd82ca31c298c.png

    Now at random it is this;

    Grass_Lighting_002.thumb.png.7d9d02dac546f227b8298063d5ddbdcc.png

     

  5. Half my grass was actually below the ground. :P  Now it looks better and I gave it some rough animation.  I've also made it that the root of the grass blades are darker.  Still needs a lot of work but I'm done for now I think.  I can fine tune it later.

    AnimatedGrass.gif.6c7212331f2955b6407e93aa7fc6081d.gif

    • Like 4
  6. I wonder what causes this in PBR lighting... my normals and world positions are passed to the fragment shader properly, but do I need tex_coords too? <_<

    Grass_Lighting.thumb.png.2de2ae11177d04b45be9dfa6f70e2759.png

    • Like 2
  7. Okay so I see now it's trying to load it from the shaders folder too... I see what your doing for the standard materials and the shader family's for Ultra but I don't think its a good idea.  Ultra needs to be flexible.  I want my shaders and textures in one folder.  I don't want to split the materials and textures into one and then my custom shaders into another.  I think we should be able to define a path because it is, after all, a file.

  8. When it comes time to expand the character controller system, I was thinking it might be good to have it as an expandable system.  Like a component where if we wanted too, override key systems of the controller, like gravity, physics and anything else that makes it a controller.  I would find that very useful.  Just a thought. ^_^

    • Like 2
  9. Just tried it out, with the skybox removed it still happens on the far wall of the base.  It's just a lot harder to tell because the colour difference between the black background and the dark gray wall is very small.  If you remove the skybox and make the cameras clear color red or something else bright you will will be able to see it better.  I don't think it has anything to do with the terrain or skybox.  I think it's something to do with the CSG objects.

    I can see in your video it is still occurring too.  A few work arounds might be - slowing the cameras rotation speed so that it's less noticeable; or, make a large enclosure for the base that has the same colour as the walls and enable it when the players is inside, so that when it happens it only reveals a similar colour behind the walls rather then the bright skybox / terrain.

    • Like 1
  10. 9 hours ago, Yue said:

    No, I don't have anything in the scene, only the last image, the error only happens when I have fog, or a terrain, or the sky.

    How many CSG objects are there in total?  I tried your demo again and saw that other CSG objects out side of the base took time to appear as well. (orange platform)  When the walls vanish they show not only the skybox but the other objects behind it too.  I tend to think it's just lots of CSG objects.  You might be better off making your base one large object in some modelling software.  But there might be something else at play, I'm not sure.

    Error.thumb.png.ea0d57e1b5c8fdbe8f7c5968afd12297.png

×
×
  • Create New...