Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(three.js issue: #5552) add BinaryTextireLoader.js, RGBELoader.js (plus ... #5624

Merged
merged 1 commit into from
Nov 14, 2014

Conversation

foo123
Copy link
Contributor

@foo123 foo123 commented Nov 13, 2014

...example), TGALoader.js extends BinaryTextureLoader.js (PR to /dev and any spacing issues fixed)

ref: issue: #5552

…js (plus example), TGALoader.js extends BinaryTextureLoader.js
mrdoob added a commit that referenced this pull request Nov 14, 2014
(three.js issue: #5552) add BinaryTextireLoader.js, RGBELoader.js (plus ...
@mrdoob mrdoob merged commit 28b2097 into mrdoob:dev Nov 14, 2014
@mrdoob
Copy link
Owner

mrdoob commented Nov 14, 2014

Woh! Many thanks!

@conorcodes
Copy link

@foo123 Do you have any examples of using BinaryTextureLoader?

I'm trying to implement a UV texture remapping using Three.js. I have a 32-bit EXR with U and V values stored in the red and green channels, and I want to use these values to distort another texture on a plane.

With 8-bit images, the bit depth is too low. I was able to get 32-bit working thanks to your RGBEloader, but it seems like I lose information in the HDR file. EXR or Tif seem to preserve the most information, but i'm stuck.

I converted my 32 bit Tif to a binary file using gdal. Any suggestions for where to go next?

Thanks!

@foo123
Copy link
Contributor Author

foo123 commented Aug 25, 2015

@conorcodes the binary texture loader is just a generic class which one has to extend (and override the parser method) in order to create a new custom loader (which is what i suppose you want).

i just added it as a super class to avoid repeating the same methods over and over on various different custom loaders, see the example with RGBE or TGA for how to extend and use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants