OpenXRay / OpenXRay/xray-16

[Scripting] Invalid sampler referenced in wallmark shader

Open
#374 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Help wanted Renderer
Dominant language
C++
Stars
3.6k
Forks
536
Avg merge
6d 1h
Merged PRs (30d)
3

Description

The effects_wallmark.s defines smp_rtlinear sampler (introduced with fa4fb77bdb45234ed0b95718bdab3ad2d1749188) while binded pixel shader stub_default_ma.ps still referencing the smp_base. Pass compiler skips the sampler resource setup since no mention about smp_rtlinear is present in shader's reflection data. Things work as expected just by a coincidence: the state manager resets all samplers descriptors to default (linear filtering + clamping) before the samplers get updated in accordance to the state parameters.

While fixing this one should consider that thedx10sampler LUA object doesn't expose any methods to control the sampler state. This can be done by using old fashioned sampler instead:

shader : sampler ("smp_base") : clamp() : f_linear()

Is there any chance to know what was wrong with original shader code? If some of the wallmarks was drawn wrapped (this is my guess) we need to check the render code first.

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 comparing effects_wallmark.s with the bound pixel shader stub_default_ma.ps and inspect how the pass compiler uses their sampler reflection data. Check the render code for the wallmark wrapping behavior mentioned in the issue, and review the dx10sampler versus sampler usage. Done means the sampler reference and state setup are consistent and the original rendering behavior is understood.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, lua
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.