Specular highlight on transparent material

Godot Version

v4.4.1

Question

Is it possible to have specular highlights on otherwise transparent materials? I thought I could simply set the ALPHA to 1 and the ALBEDO to 0 and then use blend_add, but I see don’t see specular highlight when I shine a flashlight at my window. Is my direct specular being multiplied by my ALBEDO? My METALLIC is set to 0 so that shouldn’t happen, correct? (indeed the indirect specular created by my reflection probe comes through just fine).

More specifically, I’m trying to create a glass material. Originally I downloaded it from the assetlib, and while it has the right idea I’m pretty sure the implementation is incorrect (the fresnel term is being used backwards). (EDIT: nevermind I made a mistake) I have created a simplified version for testing purposes.

shader_type spatial;
render_mode blend_add, cull_back, diffuse_burley, specular_schlick_ggx;

void fragment() {
	ALBEDO = vec3(0);
	ALPHA = 1.;
	METALLIC = 0.;
	SPECULAR = 1.;
	ROUGHNESS = 0.;
}

But alas, despite doing blend_add with alpha 1, direct specular is still nowhere to be seen.

Hi, sorry if this is too late.
I made some very simple tests and it works, but at a roughness of 0.0 the specular highlights are very very tiny and difficult to see.
set the roughness to something slightly higher like 0.11 and that will make them more noticeable.

I don’t know how you found this question, but thanks for taking the time to reply! This was quite some time ago so something might have changed since, but I tried your suggestion and indeed it would seem as though my problem was that the specular highlight was too small. Thanks again for your reply. Cheers.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.