OR
Build-in effects - OR
Last edited 2026-02-27
This effect uses bitwise OR on the base layer and top layer.
Input data:
- Self (Main texture of the object/layer, depending on where you apply the effect; contains information about Red, Green, Blue, Alpha)
- Background (Second texture that contains information about Red, Green, Blue, Alpha* pixels that are underneath Self)
Output data:
- Render (Red, Green, Blue, Alpha colors that will be displayed on the screen)
Example written in pseudocode:
load float4 Self; // LOAD Self texture
load float4 Background; // LOAD texture underneath Self texture
int3 Base = int3(Self * 255.0f); // Assign Self colors to Base, with a conversion from float to int.
int3 Blend = int3(Background * 255.0f); // Assign Self colors to Blend, with a conversion from float to int.
int3 Color = Base | Blend; // Apply OR operation to Base and Blend and assign to Color
float4 Render; // Create an empty vector
Render.rgb = float3(Color) / 255.0f; // Assign the result of the R, G, B color conversion from int to float.
Render.a = Self.a; // Assign the Alpha color from Self to Alpha
return Render; // Return the Render
Examples of recreation effects created by the community:
- OR by Cezra; It does the same shader.
- Logical OR (Background) by Foxioo; It is a modification of the effect created by Cazra, adding more options for modifying the output color.
The meaning of colors in the Type column:
|
Color |
Description |
|
Green |
This effect works in this runtime. |
|
Yellow |
It is unknown whether it works (requires confirmation) |
|
Red |
This effect does not work in this runtime. |
|
Effect |
Description |
Windows (Software / DirectDraw) |
Windows (Direct3D 8) |
Windows (Direct3D 9) |
Windows (Direct3D 11) |
Android (OpenGL ES) |
iOS (OpenGL ES) |
macOS (OpenGL ES) |
HTML5 |
Haxe (Linux) |
Haxe (WebGL) |
|
An OR logic gate is used between Self and Background colors. |
Yes |
No |
No |
No |
No |
No |
No |
Unknown |
Unknown |
Unknown |
Created with the Personal Edition of HelpNDoc: Elevate Your Documentation with HelpNDoc's Project Analyzer Features