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)
- Reading a two channel PNG (greyscale + alpha) via ImageIO::loadSTB() strips the alpha channel
- Weird code in BlockCTX1::evaluatePalette
- Assertion failed: isValidPtr(m_buffer) for nvdecompress
- Decompressing ETC2 and saving out as KTX HOT 2
- nvidia-texture-tools fails to build on aarch64 HOT 1
- make test failing for all tests
- MinGW build under Windows HOT 2
- /usr/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version (and fix)
- src/nvtt/tools/thumbnailer.cpp fails to build HOT 2
- src/nvtt/icbc.cpp compilation errors HOT 6
- Building error in GCC HOT 2
- RAW-output of a compressed image HOT 3
- Master fails to build, claims a file is missing: HOT 1
- Build errors in etcpack.cxx.o HOT 4
- Relation to NVIDIA Texture Tools exporter HOT 1
- Compile error on master branch. HOT 3
- For distribution please recompile nvtt library (Windows) with more recent Visual Studio HOT 2
- BC7 compression is very slow HOT 1
- seg fault with -bc1 -fast
- binaries faulty
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.