( I need the transparent layer of the PNG to be transparent on albedo).
I just purchased amp shader editor and I'm really liking it. Managed to create a nice atmosphere for my Planet in under few hours being just a beginner (better than a 15$ asset on asset store (next gen planets). (not a beginner at unity and using shaders however).
I am super psyced to post my first shaders, soon.
Right now I need some help, For my planet surface shader I am wanting to seperate the ocean and land which i have done in photoshop and put into 2 Transparent PNG's.
The reason for this is I want to apply separate shaders to the land and to the ocean as I intend on tessellating the land and putting a specular shimmer on the ocean.
My plan here is to have 2 sphere mesh one containing the ocean and one containing the land sitting int he same position both being transparent cutouts.
The problem is i need an example of a basic transparent cutout shader with this system as im not sure how to do this. I have trying add'ing the two images, blending them.. So that is why im going with 2 seperate mesh's and a seperate shader for each ocean/land.
The problem now is, how can i get the transparency to work on a PNG? I've been fiddling with it for a while and can't seem to get transparency to work on PNG transparent layers.
Hello, thank you for getting in touch and for your support!
You could consider using a mask in order to use the same shader on your planet mesh while still allowing for different materials to be setup within that same shader.
A few nodes may help with this, including the Lerp and the Layered, Summed or Weighted Blends. I'm attaching a simple shader sample that makes use of the Lerp operation and shows how you can have two distinct areas that are set through a mask, as an example.
Regarding your PNG question, Unity allows it to be accessed through the Alpha channel of a texture sampler. You'll have to connect the A output of the Texture Sample to the Opacity port in the Output Node, which becomes available if you set your shader's Blend Mode to Transparent.
To achieve a masked cutout, you'll have to set the Blend Mode to Masked, then connect the mask to the Opacity Mask port in the Output Node. Feel free to check out our 2Sided sample as an example for this.
Also, your project looks impressive, thank you for sharing the link, keep up the great work!
Let me know if the above information helps, thanks!
Anyhoo, I will give the stuff mentioned a shot. I really need to master shaders, or least as far as i can go with a graph editor. Are there any real limitations with this that you could do if you could program shaders from scratch?
the only other thing im trying to solve now is the emmisve lights on the planet surface. I am waning the reverse effect of blinn phong light where the emmsive texture only shows up on the dark side of the planet.
I got my planet shaders working thanks. I'll make sure to post a link to AMP on my tube video when i post it.
It's inspiring to see how your project has come long ways since its prototype!
Regarding your questions, there are no real limitations since ASE includes full source code, allowing you to actually develop your own nodes and completely customize the editor, while also providing a modern approach that aims to offer innovative and efficient shader building solutions such as the Shader Functions for reusable node networks and Shader Templates for custom shader types.
While you do not need to be an expert shader programmer in order to take advantage of ASE, or other shader editors, there are some concepts that you will need to learn in order to build shaders with a visual node editor. I advise checking out both links below:
Have you had the chance to rate and review Amplify Shader Editor? It would be awesome if you could share your experience with the Unity community, the Unity Asset Store thrives on user interaction and direct feedback. Every bit helps, your feedback is extremely valuable to us!
Let me know if you have any further questions, thanks!