You should consider joining our Discord to ask for support.

We created a support channel using the new Discord Forum feature!

You can also visit our new website, it has a help section in English and French

0 like 0 dislike
476 views
in Script help by (530 points)
closed by

Is it possible to make it so the sabr shader only affects the map and not the dialogue and portrait? The portrait is made through the use of the battle portrait function https://psdk.pokemonworkshop.fr/wiki/en/event_making/messages.html 

https://i.imgur.com/fbVXg8J.png

This is the code I'm using

Shader.register(:sc_sabr, 'graphics/shaders/sc_sabr.txt')

Graphics.on_start do

  shader = Shader.create(:sc_sabr)

  Graphics.shader = shader

  shader.set_float_uniform("rubyTextureSize", [Graphics.width, Graphics.height])

end

closed with the note: Solved

1 Answer

0 like 0 dislike
by (28.0k points)
selected by
 
Best answer

Instead of using sc_sabr you can use this script:

Hooks.register(Spriteset_Map, :initialize, 'Water Shader Initialize') do

  @viewport1.shader = Shader.create(:vp_sabr)

  @viewport1.shader.set_float_uniform('rubyTextureSize', [@viewport1.rect.width, @viewport1.rect.height])

end

Shader.register(:vp_sabr, 'graphics/shaders/sabr.txt', tone_process: false, color_process: false)

by (530 points)
Thanks. It works/
...