grendizerufo / nvidia-texture-tools

Automatically exported from code.google.com/p/nvidia-texture-tools
Other
0 stars 0 forks source link

Add support for floating point formats #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This includes:
- Add support for input images in fp16 and fp32 formats.
- Add options for floating point clamping and quantization (simple tone
mapping).
- Add support for floating point output, RGBE, and other encodings.

Original issue reported on code.google.com by cast...@gmail.com on 26 Jan 2008 at 8:57

GoogleCodeExporter commented 9 years ago
This would be really useful to have. Any chance to move this up in the priority?

Original comment by jim.tila...@gmail.com on 11 May 2008 at 5:24

GoogleCodeExporter commented 9 years ago
I'll work on this after the 2.1 release. What input and output formats do you 
need
the most?

Original comment by cast...@gmail.com on 11 May 2008 at 7:56

GoogleCodeExporter commented 9 years ago
I think for input full float format would be best (I think the freeimage 
libraries
just convert to straight floats). As for output, perhaps both the float and the 
RGBE
formats? 

Original comment by jim.tila...@gmail.com on 12 May 2008 at 6:16

GoogleCodeExporter commented 9 years ago
Ok, let's start with RGBA_F32 as input, and RGBA_F32, RGBA_F16 and RGBE as 
output. Other formats can be 
added in future releases. Let's move this back to 2.1: the patch you sent me 
handles floats in the input; 
supporting it in the output should not take too long.

Original comment by cast...@gmail.com on 12 May 2008 at 7:51

GoogleCodeExporter commented 9 years ago
Attaching Jim's patch for reference.

Original comment by cast...@gmail.com on 31 Jul 2008 at 8:43

Attachments:

GoogleCodeExporter commented 9 years ago
I've added basic support for float output. This required some API changes. To 
specify
that the output are floats instead of normalized unsigned integers I've added 
the
following function:

void CompressionOptions::setPixelType(PixelType pixelType);

where PixelType is:

enum PixelType
{
    PixelType_UnsignedNorm,
    PixelType_SignedNorm,
    PixelType_UnsignedInt,
    PixelType_SignedInt,
    PixelType_Float,
};

Currently only UnsignedNorm and Float are supported.

To specify the format I've added another setPixelFormat method. This one 
assumes that
the components are in RGBA order, and only takes the size of each component:

void CompressionOptions::setPixelFormat(unsigned char rsize, unsigned char 
gsize,
unsigned char bsize, unsigned char asize);

For example, for D3DFMT_R16G16B16A16F you would use:

compressionOptions.setPixelType(PixelType_Float);
compressionOptions.setPixelFormat(16, 16, 16, 16);

This is still a work in progress.

Original comment by cast...@gmail.com on 31 Jul 2008 at 10:00

GoogleCodeExporter commented 9 years ago
Support for RGBE and tone mapping options moved to issue 57 and issue 58.

Original comment by cast...@gmail.com on 31 Jul 2008 at 10:05

GoogleCodeExporter commented 9 years ago

Original comment by cast...@gmail.com on 11 Oct 2008 at 7:29

GoogleCodeExporter commented 9 years ago
This can be closed now.

Original comment by cast...@gmail.com on 11 Sep 2012 at 6:21