Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 19, 2024, 03:20:01 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)[SOLVED] Vert/frag replacement shader not working; surface works
Pages: [1]
Print
Author Topic: [SOLVED] Vert/frag replacement shader not working; surface works  (Read 935 times)
oahda
Level 10
*****



View Profile
« on: September 08, 2016, 06:14:46 AM »

Trying to add a replacement shader to a camera. If I try a surface shader it works, but if I try a vertex/fragment shader, no matter how simple, nothing gets rendered.

Any clue as to why this could be happening? I need to modify the vertices in this shader, so surface won't cut it.

There's nothing wrong with the vert/frag shaders I've tried; they work just fine when they're regular shaders and not replacement shaders.

I'm activating the replacement shader like this, so tags and so on shouldn't matter:

Code:
GetComponent<Camera>().SetReplacementShader(shdRepl, null);
« Last Edit: September 08, 2016, 06:23:19 AM by Prinsessa » Logged

oahda
Level 10
*****



View Profile
« Reply #1 on: September 08, 2016, 06:23:00 AM »

SOLVED already by changing camera's rendering mode from deferred to forward (found the answer in the comments to the YT video* I learned about replacements shaders from in the first place; great channel BTW!). Geeeeez. Leaving this thread here in case somebody else has the same problem in the future anyway. Feel free to lock. Angry

* Here's the video since apparently we can't just link YT anymore, it always gets embedded... q_q



Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic