stride3d / stride3d/stride

Shader Reload Bug

Open
#1,468 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: Official Release

Version: 4.1 (4.1.0.1734)

Platform(s):Windows

Describe the bug
when I create new shader and set it as Displacement Map and edit that shader the values in Displacement Map dose not update automatically and I need to set Displacement to none and place shader again or if that didn't work I have to remove the shader file and create new one.

To Reproduce
Steps to reproduce the behavior:

  1. create new project
    2.create new shader file like

`
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.

shader ComputeColorWave<float Frequency, float Amplitude, float Speed> : ComputeColor, Texturing
{
override float4 Compute()
{
float phase = length(streams.TexCoord - 0.5);
return sin((phase + Global.Time * Speed) * 2 * 3.14 * Frequency) * Amplitude;
}
};
`
if you change values like remove Amplitude or add new one it wont update the shader and you have to remove the shader file and create new one to see changes

Expected behavior
ShaderBug.zip

after add new variables or change something in the shader code it should reload without remove the old one and create new

Screenshots
note: I have fixed the code in that screen shot Grass.sdsl>line:8.
unknown (1)
unknown

Log and callstacks
EffectCompilerCache.txt
Report.txt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the shader reload failure in the attached ShaderBug.zip project, then review EffectCompilerCache.txt and Report.txt alongside the Grass.sdsl example. Confirm that editing shader variables while the shader is assigned as a Displacement Map refreshes the map without removing and recreating the shader file.

Written by the indexing model from the issue text.

Assessment

Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.