# why my HLSL code making engine crashed

**URL:** <https://forums.unrealengine.com/t/why-my-hlsl-code-making-engine-crashed/2122713>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, hlsl, Blueprint, question\
**Created:** [November 14, 2024, 3:51pm UTC](https://forums.unrealengine.com/t/why-my-hlsl-code-making-engine-crashed/2122713 "2024-11-14T15:51:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unmaless1199](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@unmaless1199](https://forums.unrealengine.com/u/unmaless1199)\
**Post date:** [November 14, 2024, 3:51pm UTC](https://forums.unrealengine.com/t/why-my-hlsl-code-making-engine-crashed/2122713/1 "2024-11-14T15:51:11Z")

</div>

I am learning the basic HLSL coding rightnow and i found couple video from youtube  
here is my code  
struct texDistort  
{  
float2 texScale(float2 uv, float2 scale)  
{  
float2 texScale = ( uv - 0.5) \* scale + 0.5;  
return texScale;  
}

```
float2 texRotate(float2 uv, float angle)
{
    float2x2 rotationMatrix = float2x2(cos(angle),sin(angle),
                                       -sin（angle),cos(angle));
    return mul(uv - 0.5, rotationMatrix) + 0.5;
    
}

```

};  
texDistort ted;

float4 color = Texture2DSample(texObject, texObjectSampler, ted.texRotate(uv,radians(45));  
return(color);

in the last vesrion i use ted.texScale instead of texRotate but they are diffrent function, Scale is for Scaling and rotate is for Roatation. But when i use Rotate it shows complier crashed

i wondering know why and how its happended how can i fix it
