Hey there pamercomov, I just wrote a quick little test program using the xray shader on an animated .x model, and it seems to be working.
I'll include a screenshot and the code so you can have a look and hopefully it can help you figure out what the problem is
// Project: xRayTest1
// Created: 20-06-28
#include ".\..\Templates\ShaderPack\Includes\ShaderPack.agc"
SP_Init()
// show all errors
SetErrorMode(2)
// set window properties
ScreenWidth# = GetMaxDeviceWidth()
ScreenHeight# = GetMaxDeviceHeight()
SetWindowSize(ScreenWidth#, ScreenHeight#, 1)
SetVirtualResolution(ScreenWidth#, ScreenHeight#)
// set display properties
SetVirtualResolution( ScreenWidth#, ScreenHeight# )
SetSyncRate( 30, 0 )
SetScissor( 0,0,0,0 )
UseNewDefaultFonts( 1 )
// Fog and Ambient Setup
SetSkyBoxVisible(1)
// setup camera
SetCameraRange(1, 1, 10000)
SetCameraPosition(1, 10, 10, 50)
SetCameraRotation(1, 35, 225, 0)
// ground
ground = CreateObjectBox(1000, 2, 1000)
SetObjectColor(ground, 40, 160, 60, 255)
SetObjectPosition(ground, 0, 0, 0)
// light
lamp = 1
CreatePointLight(lamp, 0, 0, 0, 100, 200, 200, 200)
SetPointLightMode(lamp, 1)
wall = CreateObjectBox(100, 20, 4)
SetObjectPosition(wall, 40, 10, 20)
SetObjectColor(wall, 100, 100, 100, 255)
cone = CreateObjectCone(10, 10, 10)
SetObjectPosition(cone, 20, 10, 0)
SP_XRay_AddObject(cone)
SP_XRay_SetColor(cone,0,255,100,255)
creep = LoadObjectWithChildren("creep.x")
SetObjectRotation(creep, 0, 180, 0)
SetObjectPosition(creep, 40, 0, 0)
SetObjectScalePermanent(creep, 0.08, 0.08, 0.08)
SetObjectAnimationSpeed(creep, 10)
PlayObjectAnimation(creep, "", 0, 60, 1, 0.3)
SP_XRay_AddObject(creep)
SP_XRay_SetColor(creep, 255, 0, 75, 255)
walkmode = 0
playerspeed = 1
SetRawMouseVisible(0)
SetPrintSize(25)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~LOOP~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
do
FPS = ScreenFPS()
camx = GetCameraX(1)
camy = GetCameraY(1)
camz = GetCameraZ(1)
rotX# = GetCameraAngleX(1)
rotY# = GetCameraAngleZ(1)
rotZ# = GetCameraAngleY(1)
// Player Controls
mouseX# = (GetRawMouseX()-ScreenWidth#/2)*0.1
mouseY# = (GetRawMouseY()-ScreenHeight#/2)*0.1
RotateCameraLocalX(1,mouseY#)
RotateCameraLocalY(1,mouseX#)
SetCameraRotation(1,GetCameraAngleX(1),GetCameraAngleY(1),0)
If GetCameraAngleX(1)>80 Then SetCameraRotation(1,80,GetCameraAngleY(1),0)
If GetCameraAngleX(1)<-80 Then SetCameraRotation(1,-80,GetCameraAngleY(1),0)
SetRawMouseVisible(0)
SetRawMousePosition(ScreenWidth#/2, ScreenHeight#/2)
If GetRawKeyPressed(82) // R
walkmode = 1 - walkmode
If walkmode = 0
playerspeed = 1
Else
playerspeed = 2
EndIf
EndIf
If (GetRawKeyState(87)) then MoveCameraLocalZ(1, playerspeed) // W
If (GetRawKeyState(83)) then MoveCameraLocalZ(1, 0 - playerspeed) // S
If (GetRawKeyState(65)) then MoveCameraLocalX(1, 0 - playerspeed) // A
If (GetRawKeyState(68)) then MoveCameraLocalX(1, playerspeed) // D
If (GetRawKeyState(32)) then SetCameraPosition(1, camx, camy + playerspeed, camz) // SPACE
If (GetRawKeyState(16)) then SetCameraPosition(1, camx, camy - playerspeed, camz) // SHIFT
If (GetRawKeyState(81)) then RotateCameraLocalZ(1, 1) // Q
If (GetRawKeyState(69)) then RotateCameraLocalZ(1, -1) // E
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SetRawMousePosition(ScreenWidth#/2, ScreenHeight#/2)
SetPointLightPosition(lamp, camx, camy, camz)
SP_Sync()
if GetRawKeyPressed(27) then end
loop