Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shaders #15298

Closed
IKVITS opened this issue Aug 14, 2024 · 2 comments
Closed

shaders #15298

IKVITS opened this issue Aug 14, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@IKVITS
Copy link

IKVITS commented Aug 14, 2024

Describe your problem here.

Hello, does anyone know how to make an opoonentNoteHit function that makes a shader appear and when you stop playing the note it disappears?

Are you modding a build from source or with Lua?

Lua

What is your build target?

Windows x64

Did you edit anything in this build? If so, mention or summarize your changes.

No response

@IKVITS IKVITS added the help wanted Extra attention is needed label Aug 14, 2024
@MaksPRO12667
Copy link

MaksPRO12667 commented Aug 15, 2024

I came up with something like shit, but it seems work

write it in onCreate() :

function opponentNoteHit(id, direction, noteType, isSustainNote)
	if cameraSetTarget("dad") then
		runHaxeCode([[
			var shaderName = "]] .. shaderName .. [[";
				
			game.initLuaShader(shaderName);
				
			var shader0 = game.createRuntimeShader(shaderName);
			game.camGame.setFilters([new ShaderFilter(shader0)]);
			game.getLuaObject("your shader").shader = shader0;
			game.camHUD.setFilters([new ShaderFilter(game.getLuaObject("your shader").shader)]);
			return;
		]])
	end
end
function onMoveCamera(focus)
	if focus == 'boyfriend' then
		runHaxeCode([[
			game.camGame.setFilters([]);
			game.camHUD.setFilters([]);
		]])
	end
end

@MaksPRO12667
Copy link

if you don't understand shaders well, then a video from a Russian YouTuber will help (There is a little more detail on how shaders work.):
https://youtu.be/9fG45AYNkgY?si=69EeF88TVZL9qTiT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants