LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: hdr texture  (Read 150 times)

matan45

  • Newbie
  • *
  • Offline Offline
  • Posts: 24
hdr texture
« on: November 25, 2017, 11:25:46 »

there is a way to load hdr texture as cube for sky box?
Logged

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1908
Re: hdr texture
« Reply #1 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.
Logged

matan45

  • Newbie
  • *
  • Offline Offline
  • Posts: 24
Re: hdr texture
« Reply #2 on: November 27, 2017, 17:16:25 »

yea but hdr is 1 image 360
Logged

KaiHH

  • Newbie
  • *
  • Offline Offline
  • Posts: 16
Re: hdr texture
« Reply #3 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
- environment.vs
- environment.fs
Logged

matan45

  • Newbie
  • *
  • Offline Offline
  • Posts: 24
Re: hdr texture
« Reply #4 on: December 07, 2017, 15:26:20 »

Logged

KaiHH

  • Newbie
  • *
  • Offline Offline
  • Posts: 16
Re: hdr texture
« Reply #5 on: December 07, 2017, 18:31:40 »

yes
Logged