-
Notifications
You must be signed in to change notification settings - Fork 18
Misc 1.) Using this shader with Raycast
Thanks to Chips for figuring out how to do this!
Because of Genshin's diffuse textures, you're going to run into pretty apparent errors immediately. If you've tried to use the shader with raycast in the past, you already know what those are.
So to start, you're actually going to want to go into your raycast folder. Inside the Shadow folder are a few different fx. SelectPSSM1.fx
,PSSM2.fx
,PSSM3.fx
, andPSSM4.fx
. Create a copy of each of these files and name them whatever you want, just make sure its something you will remember later.
Now, in each of those new copies you made, edit the lineconst float CasterAlphaThreshold = 0.0;
and set the float to 1.0f. Don't use notepad to edit shaders. I will actually curse you.
This will fix the model not casting shadows.
After doing the above step, you're ready to set up the raycast scene. Don't worry about assigning any raycast stuff to the actual model(s) yet, just worry about the environment.
I will explain things tab by tab in the MMEffect window, starting at the Main tab.
In this tab, you will assign the MMDGenshin shader as normal.
(3:Mat_face
is the eye star material, I didn't have the morph for it set up yet so don't mind that.)
Moving down the tab list you'll end up on MaterialMap. In this tab you're going to assign the model the
material_skybox.fx
shader. This will fix the model's transparent look as well as any weird artifacts.
Your final stop is these 4 tabs. In these tabs, you're going to load the copies of the original fx that you made in the Before you start section.