Hi,
I'm using background images which are moving in the background, as the player does move. The pictures are created to be seamless and are tiled. If the picture ends, it will start again.
The issue is, that I observe 1 pixel column artifact. I created a screenshot and marked the area in paint:
https://lukas-kalinowski.com/Homepage/w ... 2_22_0.png
This is my hlsl shader:
Code: Select all
Texture2D backgroundMap : register(t0);
SamplerState samplerState : register(s0);
float speedX;
float speedY;
float4 main(float2 uv0 : TEXCOORD0) : SV_Target
{
// Apply scroll
uv0.x += speedX;
uv0.y += speedY;
return backgroundMap.Sample( samplerState, uv0 );
}
The material which is used in compositor:
Code: Select all
// HLSL shaders
fragment_program NOWABackgroundPostprocess_ps_HLSL hlsl
{
source NOWABackgroundPostprocess_ps.hlsl
entry_point main
target ps_5_0 ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3
}
// Material definition
material NOWABackgroundPostprocess
{
technique
{
pass
{
// https://forums.ogre3d.org/viewtopic.php?t=23280
// https://forums.ogre3d.org/viewtopic.php?f=2&t=82855&p=515294&hilit=material+scroll+texture#p515294
// scene_blend modulate
scene_blend alpha_blend
// scene_blend add
//lighting off
depth_check on
depth_write off
cull_hardware none
vertex_program_ref Ogre/Compositor/Quad_vs
{
}
fragment_program_ref NOWABackgroundPostprocess_ps
{
param_named speedX float 0
param_named speedY float 0
}
texture_unit backgroundMap
{
texture Sky.png
alpha_op_ex add src_manual src_texture 0.1
filtering trilinear
scale 10 10
}
}
}
}
Has anybody an idea, what I'm doing wrong, or is there a bug in ogre?
Best Regards
Lax