Skip to content

Need help getting this shader to run #5270

Closed Answered by NotHyper-474
rockybalboba asked this question in Q&A
Discussion options

You must be logged in to vote

Works fine on my end

Corrected code for reference

import flixel.FlxG;
import funkin.modding.module.Module;
import funkin.Paths;
import funkin.play.PlayState;
import flixel.FlxCamera;
import flixel.addons.display.FlxRuntimeShader;
import openfl.filters.ShaderFilter;
import StringTools;

class NtscFilter extends Module {

	var crtShader:FlxRuntimeShader = new FlxRuntimeShader(Assets.getText(Paths.frag('ntsc')), null, '120');

	public function new()
	{
		super('NtscFilter');
	}

	public override function onCountdownStart(event:ScriptEvent) {
		super.onCountdownStart(event);

        PlayState.instance.camGame.filters = [new ShaderFilter(crtShader)];

	}
}

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@rockybalboba
Comment options

@NotHyper-474
Comment options

@rockybalboba
Comment options

@NotHyper-474
Comment options

Answer selected by rockybalboba
@rockybalboba
Comment options

@NotHyper-474
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants