Custom Effect

Custom Effect 1.0.0

Firepolo

New Member
Firepolo submitted a new resource:

Custom Effect - Lightweight plugin for create your own shader effect for OBS Studio.

Custom Effect
- This lightweight plugin you allow of create your own filters for OBS.

Installation
- Extract archive
- Copy obs-studio folder in your "C:\Program Files" for Windows

Usage
- Create your own file ".effect
- Open OBS-Studio
- Right-click on a Video Source and select "Filters"
- In the list "Effect Filters", select "Custom Effect"
- Then in the properties select your file ".effect"

Extra
-...

Read more about this resource...
 

TrinityThr333

New Member
Hello! New here! Can you help me get this to work? In chatgpt i gave this prompt: Please write the HLSL code for custom.effect to start at the top left corner position 0, 0, for an image height of 446 px, scroll to bottom of the screen with height of 900 px with a speed of 3.33 as it would in the default obs scroll verticle filter, stop when the bottom of the image touches the bottom of the screen, then scroll back to the top and repeat forever, include any parts of gameboy.effect code for dependancies.

Certainly! I can help you with that. Based on your prompt, here's the adjusted HLSL code for the scroll.effect with the desired scrolling behavior:
// Scroll Effect HLSL Shader

uniform float scrollSpeed; // Speed of scrolling in pixels per second

float2 screenSize = float2(1920, 900); // Screen size in pixels
float imageHeight = 446; // Height of the image in pixels

// Vertex Shader
void VSMain(in float4 position : POSITION, out float4 oPosition : SV_POSITION)
{
oPosition = position;
}

// Pixel Shader
float4 PSMain(in float4 position : SV_POSITION) : SV_Target
{
float time = abs(sin(_Time.y)); // Vary the time value to control scrolling speed

// Calculate the vertical scrolling position
float scrollPos = time * scrollSpeed;
scrollPos = frac(scrollPos); // Keep the position within the range of [0, 1]

// Calculate the final vertical position of the pixel based on the scroll position
float yPos = position.y + scrollPos * imageHeight;

// If the bottom of the image touches the bottom of the screen, stop scrolling
if (yPos >= screenSize.y)
yPos = screenSize.y - 1;

// If the scrolling reaches the top, wrap back to the bottom of the image
if (yPos < 0)
yPos += imageHeight;

// Calculate the final position of the pixel
float2 finalPosition = float2(position.x, yPos);

// Perform any additional operations on the pixel color
// ...

return float4(1.0, 1.0, 1.0, 1.0); // Replace with your desired color
}

technique ScrollTechnique
{
pass
{
vertex_shader = VSMain(position);
pixel_shader = PSMain(position);
}
}

When loading:
err.png

Help! Thank-you!
 
Last edited:
Top