Jump to content

SpiderPig

Developers
  • Posts

    2,271
  • Joined

  • Last visited

Posts posted by SpiderPig

  1. Because I like being efficient (#lazy) I was wondering if we could have a few shortcut keys for some of the menu items in the asset editor?

    Something like the standards perhaps -

    Save : Ctr+S

    Save As : Ctrl + Shift + S

    Toggle Wireframe : F2

    Toggle Collider : F3

  2. I was trying something similar in the frag shader.  I just didn't call RenderLighting if the fragment was in shadow but I thought the results were too dark.  (the gif above)

    if(enable_lighting == true)
    {
    	RenderLighting(material, materialInfo, vertexWorldPosition.xyz, n, v, NdotV, f_diffuse, f_specular, renderprobes, ibldiffuse, iblspecular);
    }

    Can I simply disable lighting like this to see the shadow or is this not the best approach?

  3. My thoughts exactly.  A slow light would only need updating every second or so.  It's only a 512x512 terrain.  The slowest part is when the whole terrain is in light because then every ray cast dosnt hit somthing so is very long.  I allready stop the ray when it leaves the AABB of the terrain.  I also want to blend in the default shadow system when up close.  That should look real good.  Will have to match the shadow color.  Are the shadows in Ultra just multiplied over the final frag color?

  4. Second go at this.  Not as hard as it looks to get something basic going.  I think the majority of the work will be performance improvements and making the shadows look nicer.

    ShadowHeightmap.gif.25b0f2910ce772803a258eeb1543f15d.gif

    It's "semi" real-time now.  Still on the CPU but on another thread who's sole purpose is to calculate the shadow map until the program quits.   Takes about 500 or so milliseconds to calculate the shadow map, hence the jitter as the sun get's higher.

    I think I can improve the ray casting speed but I want to focus on smoothing out those shadows.  I'm wondering if signed distance fields can help... maybe by storing each pixels distance to the nearest shadow I can calculate the fragments distance and blend accordingly.  Works in my head anyway.  :D   I think I'll sleep on it.

  5. The curse of the pine tree.  This GLTF is recently exported from blender.  Passing the files to the editor works good.  But loading the model in editor and clicking "Convert Textures To DDS" fails on one of the textures.

    PineTree.zip

    I haven't yet figured out how to get blender to export DDS with the GLTF directly...

    umpa-lumpa-oompa-loompa.gif

    • Thanks 1
  6. Thanks, I did this in BeginDispatch():

    switch (hook)
    {
    case ComputeHook::RENDER:
    	world->AddHook(HookID::HOOKID_RENDER, BeginComputeShaderDispatch, info, !oneTime);
    	break;
    case ComputeHook::TRANSFER:
    	world->AddHook(HookID::HOOKID_RENDER, BeginComputeShaderDispatch, info, !oneTime);
    	break;
    }

    It doesn't crash now and the cubes spin but remain pink.

    ComputeShaderCubes.thumb.png.0fe4c85bc8fba5a7739d5bf9b08cfbfe.png

  7. Hey @klepto2 I just tried you compute shader example here.  I'm using the latest shaders and I'm getting a consistent access violation in this function:

    void Reset(VkCommandBuffer buffer)
    {
    	vkCmdResetQueryPool(buffer, _queryPool, 0, 2);
    }

    Any insight you might have is appreciated. :)

  8. Would it be possible to see an added component affect the object it was added too in the editor?  Like the Mover component, I add it and then change the rotation parameter and start seeing the object rotate.  I can see how it could work for Lua components but maybe not C++ components.  Anyway just a thought.  :)

×
×
  • Create New...