Jump to content

klepto2

Developers
  • Posts

    929
  • Joined

  • Last visited

Community Answers

  1. klepto2's post in ToneMapping Blurs Results was marked as the answer   
    small correction:
    void main() { ivec2 coord = ivec2(gl_FragCoord.x, gl_FragCoord.y); outColor = texelFetch(ColorBuffer, coord,gl_SampleID); outColor.rgb = aces(outColor.rgb); } this also uses the sampleID, which might be better in this case.
  2. klepto2's post in Debug vs Release : No Change in FPS was marked as the answer   
    Just my thought. The debug-build was mainly slower because the vulkan validation-layer kicks in and slows everything down. In Leadwerks there was also no difference between debug and release (for simple apps). 
  3. klepto2's post in Sprite with pixmap was marked as the answer   
    2 Things:
    I believe the WidgetBlock Family is not the right one, better use the unlit family for this. your sprite with the material has a size of 0,0 so it will never be displayed no matter what you try to do auto pixmap = CreatePixmap(iVec2(100, 100)); pixmap->Fill(Vec4(0.5f, 0.5f, 1, 1)); auto tex = CreateTexture(TEXTURE_2D, 100, 100, TEXTURE_RGBA, { pixmap }, 1, TEXTURE_CLAMP_UV); auto mtl = CreateMaterial(); mtl->SetTexture(tex); mtl->SetShadow(false); mtl->SetTransparent(true); mtl->SetShaderFamily(LoadShaderFamily("Shaders/Unlit.fam")); //Create pixmap sprite auto sprite = CreateSprite(world, 40, 40); sprite->SetPosition(20, 20); //sprite->SetViewMode(SPRITEVIEW_BILLBOARD); sprite->SetMaterial(mtl); sprite->SetText("Test"); sprite->SetRenderLayers(2); with these changes the colored sprite is visible in the lower left corner.
  4. klepto2's post in Load Bug in SlidingDoor.hpp was marked as the answer   
    The sliding door component has a small bug in the load method:
    if (t["enabled"].is_boolean()) enabled = t; should be:
    if (t["enabled"].is_boolean()) enabled = t["enabled"]; otherwise after reloading the scene from a saved game the door becomes inactive.
  5. klepto2's post in Shader Tutorial was marked as the answer   
    Try this: i have added the diffuse layer, so the background is visible.
    1. I changed the noise texture to the one used by shadertoy (using other textures might lead to artifacts)
    2. I corrected the aspect ratio calculation you had p.x*= gl_FragCoord.x / buffersize.y; where is should be  p.x*= buffersize.x / buffersize.y;
    Effect.zip
×
×
  • Create New...