LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: matan45 on November 25, 2017, 11:25:46

Title: hdr texture
Post by: matan45 on November 25, 2017, 11:25:46
there is a way to load hdr texture as cube for sky box?
Title: Re: hdr texture
Post by: spasi on November 25, 2017, 13:03:05
Cube maps are usually stored and loaded as arrays of 6 images. The STBImage.stb_loadf* functions is probably what you're looking for.
Title: Re: hdr texture
Post by: matan45 on November 27, 2017, 17:16:25
yea but hdr is 1 image 360
Title: Re: hdr texture
Post by: KaiHH on November 27, 2017, 18:42:16
You (likely) have an image which uses an "Equirectangular Projection". For a demo on how to use that with LWJGL 3, see:
- EnvironmentDemo.java (https://github.com/LWJGL/lwjgl3-demos/blob/master/src/org/lwjgl/demo/opengl/textures/EnvironmentDemo.java)
- environment.vs (https://github.com/LWJGL/lwjgl3-demos/blob/master/res/org/lwjgl/demo/opengl/textures/environment.vs)
- environment.fs (https://github.com/LWJGL/lwjgl3-demos/blob/master/res/org/lwjgl/demo/opengl/textures/environment.fs)
Title: Re: hdr texture
Post by: matan45 on December 07, 2017, 15:26:20
how about this?
https://learnopengl.com/#!Advanced-Lighting/HDR
Title: Re: hdr texture
Post by: KaiHH on December 07, 2017, 18:31:40
yes