Comments (6)
Charles Nicholson points out this article from Tom Forsyth about pre-multiplied
alpha:
http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5B%5BPremultiplied%20alpha%
5D%5D
Original comment by [email protected]
on 4 Mar 2008 at 10:59
from nvidia-texture-tools.
Ignacio-
Here's a patch against 2.0.1 with the following features:
InputOptions has "void setPremultiplyAlpha(bool b)", backed by
InputOptions::Private
"bool premultiplyAlpha".
Compressor has the private method "premultiplyAlphaMipmap(Mipmap&, const
InputOptions::Private&)", that converts the mipmap to a FloatImage, multiplies
the
RGB channels by A into a new FloatImage, and overwrites the old one with the
new one.
This happens after mipmap initialization, but before quantization/compression.
nvcompress.exe has the command-line flag "-premula" to invoke this
functionality.
The code in Compressor is a little sloppy in that it doesn't confirm the correct
number of channels, or error if conflicting options exist. I'm pretty sure you
can
do it to a normal map, which you probably don't want. I adhered to the coding
standard in as much as i could glean without a doc.
Best,
charles
Original comment by [email protected]
on 5 Mar 2008 at 9:49
Attachments:
from nvidia-texture-tools.
Thanks, I checked that in with some changes. I think alpha premultiplication
should
be applied in the destination gamma space. If you apply it in linear space,
then when
you transform the color to gamma space you will also transform the
premultiplied alpha.
Original comment by [email protected]
on 7 Mar 2008 at 1:49
- Changed state: Started
from nvidia-texture-tools.
The cuda compressors now have support for alpha modes.
Original comment by [email protected]
on 6 May 2008 at 8:04
from nvidia-texture-tools.
Original comment by [email protected]
on 11 Oct 2008 at 7:30
- Added labels: Priority-High
- Removed labels: Priority-Medium
from nvidia-texture-tools.
Original comment by [email protected]
on 24 Nov 2008 at 10:36
- Changed state: Fixed
from nvidia-texture-tools.
Related Issues (20)
- xyzToCieLab bug HOT 2
- Add CIE Lab DeltaE 1994 color differencing HOT 2
- Missing CubeSurface fold/unfold implementation HOT 2
- Missing files in vs10 solution HOT 5
- endImage() never called HOT 6
- nvcore will not compile in visual studio 2010 HOT 3
- Doesn't compile with VS 2013 HOT 1
- [PATCH] Linux compilation fixes HOT 2
- Can you add to support define custom rgba value?
- Crash when attempting to use Surface::toNormalMap(...) HOT 2
- [PATCH] Minor issue with debug checks in ErrorMetric.cpp HOT 3
- Division by zero in QuickCompressDXT.cpp, line 452
- Support all OutputFormat's as InputFormat's HOT 4
- undefined reference to nv::Fit::* HOT 3
- Patches for building on OSX HOT 1
- Broken normalization of normal maps
- Visual Studio Compile Errors
- "make" the texture tools will error on CompressKernel.gen.c.o HOT 2
- Compilation fails using gcc 4.9.1
- Please support tag somewhere normal map textures HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvidia-texture-tools.