<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.orx-project.org/wiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://www.orx-project.org/wiki/feed.php">
        <title>Orx Learning - en:examples:shaders</title>
        <description></description>
        <link>https://www.orx-project.org/wiki/</link>
        <image rdf:resource="https://www.orx-project.org/wiki/_media/favicon.ico" />
       <dc:date>2026-04-15T03:08:13+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://www.orx-project.org/wiki/en/examples/shaders/flashing_an_object_white?rev=1759253179&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.orx-project.org/wiki/en/examples/shaders/flashing_an_object_white_shader_params?rev=1759253179&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.orx-project.org/wiki/en/examples/shaders/main?rev=1759253179&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.orx-project.org/wiki/en/examples/shaders/shader_on_an_object?rev=1759253179&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.orx-project.org/wiki/en/examples/shaders/shader_on_a_spritesheet?rev=1759253179&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.orx-project.org/wiki/en/examples/shaders/sine_effect?rev=1759253179&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://www.orx-project.org/wiki/_media/favicon.ico">
        <title>Orx Learning</title>
        <link>https://www.orx-project.org/wiki/</link>
        <url>https://www.orx-project.org/wiki/_media/favicon.ico</url>
    </image>
    <item rdf:about="https://www.orx-project.org/wiki/en/examples/shaders/flashing_an_object_white?rev=1759253179&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-09-30T17:26:19+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Flashing an Object White</title>
        <link>https://www.orx-project.org/wiki/en/examples/shaders/flashing_an_object_white?rev=1759253179&amp;do=diff</link>
        <description>Flashing an Object White

Useful for indicating hits on an object, for example in shoot-em-ups.

Assets



Code


orxObject_CreateFromConfig(&quot;Object&quot;);


Config


[Object]
Graphic         = Graphic
TrackList	= WhiteFlashTrack

[Graphic]
Texture       = ship.png

[WhiteShader]
ParamList = texture
Code = &quot;
void main() {
 
    vec2 p = gl_TexCoord[0].xy;
    vec4 textureCol = texture2D(texture, p);
 
    gl_FragColor.r = 1.0;
    gl_FragColor.g = 1.0;
    gl_FragColor.b = 1.0;
    gl_FragColor.a = …</description>
    </item>
    <item rdf:about="https://www.orx-project.org/wiki/en/examples/shaders/flashing_an_object_white_shader_params?rev=1759253179&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-09-30T17:26:19+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Flashing an Object White with Params</title>
        <link>https://www.orx-project.org/wiki/en/examples/shaders/flashing_an_object_white_shader_params?rev=1759253179&amp;do=diff</link>
        <description>Flashing an Object White with Params

(Using a shader that accepts parameters)

Useful for indicating hits on an object, for example in shoot-em-ups.

Assets



Code


orxObject_CreateFromConfig(&quot;Object&quot;);


Config


[Object]
Graphic         = Graphic
ShaderList	= WhiteShader

[Graphic]
Texture       = ship.png

[WhiteShader]
ParamList = texture # objectTime # flashSpeed # maxFlashes
objectTime = time
maxFlashes = 4 ;how many times to flash
flashSpeed = 8 ;how fast between flashes
Code = &quot;
void …</description>
    </item>
    <item rdf:about="https://www.orx-project.org/wiki/en/examples/shaders/main?rev=1759253179&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-09-30T17:26:19+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Shader Examples</title>
        <link>https://www.orx-project.org/wiki/en/examples/shaders/main?rev=1759253179&amp;do=diff</link>
        <description>Shader Examples

shader_on_an_object 
Shader on an Object
shader_on_a_spritesheet 
Shader on a Sprite Sheet
flashing_an_object_white 
Flashing an Object White (shader and track)
flashing_an_object_white_shader_params 
Flashing an Object White (shader with params)
sine_effect 
Sine effect on an Object
shaders 
See Shader Tutorials</description>
    </item>
    <item rdf:about="https://www.orx-project.org/wiki/en/examples/shaders/shader_on_an_object?rev=1759253179&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-09-30T17:26:19+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Shader on an Object</title>
        <link>https://www.orx-project.org/wiki/en/examples/shaders/shader_on_an_object?rev=1759253179&amp;do=diff</link>
        <description>Shader on an Object

Assets



Code


orxObject_CreateFromConfig(&quot;DemoObject&quot;);


Config


[DemoObject]
Graphic = DemoGraphic
ShaderList = Shader

[DemoGraphic]
Texture = ship.png

[Shader]
ParamList = texture
Code = &quot;
void main() {
	
    vec2 p = gl_TexCoord[0].xy;
    vec4 textureCol = texture2D(texture, p);
 
    gl_FragColor.rgb = textureCol.rgb;
    gl_FragColor.a = textureCol.a * (1.0 - p.y);
	
}&quot;</description>
    </item>
    <item rdf:about="https://www.orx-project.org/wiki/en/examples/shaders/shader_on_a_spritesheet?rev=1759253179&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-09-30T17:26:19+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Shader on a Sprite Sheet</title>
        <link>https://www.orx-project.org/wiki/en/examples/shaders/shader_on_a_spritesheet?rev=1759253179&amp;do=diff</link>
        <description>Shader on a Sprite Sheet

Assets

  

Code


orxObject_CreateFromConfig(&quot;DemoObject&quot;);


Config


[DemoObject]
Graphic = DemoGraphic
ShaderList = Shader
Scale = 10
 
[DemoGraphic]
Texture = sprites.png
TextureOrigin = (0,8,0)
TextureSize = (8,8,0)

[Shader]
ParamList = texture 
Code = &quot;

void main() {
    vec2 p = gl_TexCoord[0].xy;
    vec4 textureCol = texture2D(texture, p);
 
	vec2 textStartCoord = vec2(texture_left, texture_top);
	vec2 textEndCoord = vec2(texture_right, texture_bottom);
	vec…</description>
    </item>
    <item rdf:about="https://www.orx-project.org/wiki/en/examples/shaders/sine_effect?rev=1759253179&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-09-30T17:26:19+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Sine effect on an Object</title>
        <link>https://www.orx-project.org/wiki/en/examples/shaders/sine_effect?rev=1759253179&amp;do=diff</link>
        <description>Sine effect on an Object

Assets



Code


orxObject_CreateFromConfig(&quot;Chicken&quot;);


Config


[Chicken]
Graphic    = @
Texture    = chicken.png
ShaderList = SineShader

[SineShader]
ParamList      = texture # time
time           = time
UseCustomParam = true
Code           = &quot;
void main() {
	#define BENDS 16.0
	#define SINE_HEIGHT 20.0 //less is higher

	vec2 p = gl_TexCoord[0].xy;

	vec2 sineAffectedP = vec2(p.x, p.y + (sin((p.x*BENDS - (time*2.0))) / SINE_HEIGHT) ); 
	vec4 texFragment = texture2…</description>
    </item>
</rdf:RDF>
