OpenXRay/xray-16

[Scripting] Invalid sampler referenced in wallmark shader

Aperta

#374 aperta il 23 mar 2019

 (8 commenti) (0 reazioni) (0 assegnatari)C++ (519 fork)auto 404
BugHelp wantedRenderer

Metriche repository

Star
 (3524 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor