0 votes

Engine: 3.0.6
uniform sampler2D tex1;
uniform samplerCube tex2;

Hi, all !
In The shader param Inspector Panel,
There is no selection for .hdr,
so, how to use .hdr format file in shader?
Thanks !

in Engine by (14 points)

If you load in a HDR image it will automatically be HDR. The Godot shaders use HDR as standard and you actually have to manually set it lower if you want less prepossession.


Can I bind a HDR image to "uniform sampler2D" or "uniform samplerCube" ?
commonly, use "texture(samplerCube, vec3)" to get reflection color,
but, I dont know how to do in godot.
Thanks !

Can I bind a HDR image to "uniform sampler2D" or "uniform samplerCube" ?

Godot has samplerCube

commonly, use "texture(samplerCube, vec3)" to get reflection color,

vec4_type texture ( samplerCube s, vec3 uv [, float bias] )
Meaning you will get a vec4 value using: texture(MyCubeMap, UV, 0.15);

I don't know what you are trying to do, but if you want HDR rendering there is a Godot demo project.

I hope some of this helps you.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.