Coder Social home page Coder Social logo

capsaicin's People

Contributors

kurbeco avatar rys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

capsaicin's Issues

unpackNormal unpack positive values only

core/src/math/pack.hlsl:481, the unpackNormal function fails to unpack normals with negative values packed with packNormal.

The current implementation of unpackNormal is:

/**
 * Convert 10bit snorms to normal vector.
 * @param packedValue Input snorm values to convert.
 * @returns Converted float values (range [-1,1]).
 */
float3 unpackNormal(uint packedValue)
{
    uint3 value = uint3(packedValue, packedValue >> 10,
        packedValue >> 20) & 0x3FFu.xxx;
    return float3(value) * (1.0f / 511.0f).xxx;
}

It fails to unpack negative values.

setDebugView(const std::string_view &) malfunctions.

at capsaicin_internal.cpp: 665:

bool CapsaicinInternal::setDebugView(std::string_view const &name) noexcept
{
    auto debugView = std::find_if(
        debug_views_.cbegin(), debug_views_.cend(), [this](auto val) { return debug_view_ == val.first; });
    if (debugView == debug_views_.cend())
    {
        GFX_PRINTLN("Error: Requested invalid debug view: %s", name.data());
        return false;
    }
    debug_view_ = name;
    return true;
}

debug_view_ = name; assumes that name is a string view of a string whose lifetime expands across frames. When a string_view of a temporary string object is passed in (and it is "equal" to one of the strings within the vector debug_views), the function silently fails, debug_view sooner become meaningless and ultimately causes random behavior.
I'll suggest a fix about changing debug_view_ = name; to debug_view_ = *debugView;
Also, auto debugView = std::find_if(debug_views_.cbegin(), debug_views_.cend(), [this](auto val) { return debug_view_ == val.first; }); seems to not be doing correct validation.

Bug: Shader path length exceeds kGfxConstant_NumNameLength (64)

In visibility_buffer.cpp, line 69-70:

    disocclusion_mask_program_ = gfxCreateProgram(
        gfx_, "render_techniques/visibility_buffer/disocclusion_mask", capsaicin.getShaderPath());

It potentially creats a shader program path src/core/src/render_techniques/visibility_buffer/disocclusion_mask, which is a string of length 66. It overflows the name property of class GfxProgram and cause the program to crash by chance.

Upgrading DXC fixes the compiler crash.

At light_sampler_bounds.hlsl:282, by upgrading DXC to 2024.3.22 the inout decorator will not crash the compiler again. Thus the random numbers wont be reused in the reservoir generation.

About the `ssgi_unroll_kernel_` option in scene viewer

I noticed there's a ssgi_unroll_kernel_ option in the Render Options panel at the bottom of the scene viewer GUI:

image

This option is disabled by default, but enabling it improves performance on a GeForce RTX 4090:

SSGI type 1920x1080 3840x2160
Unroll disabled 596 FPS (1.68 mspf)1 175 FPS (5.71 mspf)
Unroll enabled 613 FPS (1.63 mspf)1 181 FPS (5.53 mspf)

Is there a reason it's not enabled by default? I can't spot any visual difference in quality, both in still scenes and when moving the camera.

Footnotes

  1. Measured with V-Sync forcibly disabled in NVIDIA Control Panel, as the low GPU utilization causes the GPU to downclock (which makes the FPS estimation incorrect). Otherwise, I only get 300 FPS in 1080p on a 120 Hz display with V-Sync enabled. โ†ฉ โ†ฉ2

Assertion failed

Getting this when I'm running the scene viewer from Visual Studio in debug mode. In release mode I get a black screen and the app crashes after a while.

fail

br,
Sami

CMake Failed

Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.
The C compiler identification is MSVC 19.29.30148.0
The CXX compiler identification is MSVC 19.29.30148.0
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
Detecting C compile features
Detecting C compile features - done
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
Found Bash: C:/Program Files/Git/bin/bash.exe
Looking for CL_VERSION_2_2
Looking for CL_VERSION_2_2 - not found
Looking for CL_VERSION_2_1
Looking for CL_VERSION_2_1 - not found
Looking for CL_VERSION_2_0
Looking for CL_VERSION_2_0 - not found
Looking for CL_VERSION_1_2
Looking for CL_VERSION_1_2 - not found
Looking for CL_VERSION_1_1
Looking for CL_VERSION_1_1 - not found
Looking for CL_VERSION_1_0
Looking for CL_VERSION_1_0 - not found
Could NOT find OpenCL (missing: OpenCL_LIBRARY OpenCL_INCLUDE_DIR)
Found Vulkan: C:/VulkanSDK/1.3.239.0/Lib/vulkan-1.lib
Found Perl: C:/Strawberry/perl/bin/perl.exe (found version "5.32.1")
AVX2 backend - ON
SSE4.1 backend - OFF
SSE2 backend - OFF
NEON backend - OFF
NONE backend - OFF
NATIVE backend - OFF
Decompressor - OFF
No invariance - OFF
Diagnostics - OFF
ASAN - OFF
Unit tests - OFF
Performing Test COMPILER_HAS_DEPRECATED_ATTR
Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed
Performing Test COMPILER_HAS_DEPRECATED
Performing Test COMPILER_HAS_DEPRECATED - Success
Configuring done
CMake Error at src/core/CMakeLists.txt:109 (add_custom_command):
Error evaluating generator expression:

$<TARGET_RUNTIME_DLLS:core>

Expression did not evaluate to a known generator expression

CMake Error at src/core/CMakeLists.txt:109 (add_custom_command):
Error evaluating generator expression:

$<TARGET_RUNTIME_DLLS:core>

Expression did not evaluate to a known generator expression

CMake Error at src/core/CMakeLists.txt:109 (add_custom_command):
Error evaluating generator expression:

$<TARGET_RUNTIME_DLLS:core>

Expression did not evaluate to a known generator expression

CMake Error at src/core/CMakeLists.txt:109 (add_custom_command):
Error evaluating generator expression:

$<TARGET_RUNTIME_DLLS:core>

Expression did not evaluate to a known generator expression

CMake Error at src/core/CMakeLists.txt:109 (add_custom_command):
Error evaluating generator expression:

$<TARGET_RUNTIME_DLLS:core>

Expression did not evaluate to a known generator expression

CMake Error at src/core/CMakeLists.txt:109 (add_custom_command):
Error evaluating generator expression:

$<TARGET_RUNTIME_DLLS:core>

Expression did not evaluate to a known generator expression

CMake Error at src/core/CMakeLists.txt:109 (add_custom_command):
Error evaluating generator expression:

$<TARGET_RUNTIME_DLLS:core>

Expression did not evaluate to a known generator expression

CMake Error at src/core/CMakeLists.txt:109 (add_custom_command):
Error evaluating generator expression:

$<TARGET_RUNTIME_DLLS:core>

Expression did not evaluate to a known generator expression

CMake Error:
Error evaluating generator expression:

$<TARGET_RUNTIME_DLLS:scene_viewer>

Expression did not evaluate to a known generator expression

CMake Error:
Error evaluating generator expression:

$<TARGET_RUNTIME_DLLS:scene_viewer>

Expression did not evaluate to a known generator expression

CMake Error:
Error evaluating generator expression:

$<TARGET_RUNTIME_DLLS:scene_viewer>

Expression did not evaluate to a known generator expression

CMake Error:
Error evaluating generator expression:

$<TARGET_RUNTIME_DLLS:scene_viewer>

Expression did not evaluate to a known generator expression

Generating done

Compiled `scene_viewer.exe` does not work unless run from root directory

OS: Windows 11
Compiler: Visual Studio 2022, CMake 3.26.3

I cloned this repository with --recursive and ran cmake -S ./ -B ./build -A x64 then cmake --build ./build --config RelWithDebInfo as instructed in getting_started.md. The scene_viewer.exe binary compiled successfully, but running it by double-clicking it spawns a window that closes immediately. Running --help shows a list of CLI arguments (including a functional --list-scenes), so the binary isn't broken.

I was able to resolve the issue by running build\bin\RelWithDebInfo\scene_viewer.exe from the cloned repository root. Ideally, scene_viewer.exe should automatically scan up to 3 folders upwards1 so that you can double-click it and it'll just work ๐Ÿ™‚

Footnotes

  1. Other buildsystems generated by CMake may not nest the binary so much as the MSVC one. โ†ฉ

Shadow / bias issue?

Hi,

I'm getting a weird issue that looks almost like some kind of shadow map self-bias error on some materials. The scene I'm testing with is originally converted from UE, and it has been working fine with my other test projects.

Since it renders mostly OK, I assume there's something wrong in rendering certain material types? (I'm guessing reflections?)

Uploaded a video clip here:

https://drive.google.com/file/d/1CoWiPlcMJjRl91HPn2X--ldzToypptUN/view

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.