3Dmigoto now open-source...
  60 / 141    
The reason is that in ROTTR there are some areas where the performance on my weak PC is so bad with 3Dmigoto (<20 FPS even with all settings on low) that I would like to switch to CM for this special situations (which allows me to play on much higher settings and still better performance). But CM is messed up by the 3Dmigoto fixes so I have to disable them - preferably without restarting the game every time. I have found a work around: I set hunting=2 in d3dx.ini. I make 2 folders, one with the content of the original ShaderFixes folder and one empty. With autohotkey I rename in the background one of the two folders to "ShaderFixes" while the game is running and press F10 to reload the shader fixes. So I can use either the original fix (for "3Dmigoto mode") or an "empty" fix for CM.
The reason is that in ROTTR there are some areas where the performance on my weak PC is so bad with 3Dmigoto (<20 FPS even with all settings on low) that I would like to switch to CM for this special situations (which allows me to play on much higher settings and still better performance). But CM is messed up by the 3Dmigoto fixes so I have to disable them - preferably without restarting the game every time.
I have found a work around: I set hunting=2 in d3dx.ini. I make 2 folders, one with the content of the original ShaderFixes folder and one empty. With autohotkey I rename in the background one of the two folders to "ShaderFixes" while the game is running and press F10 to reload the shader fixes. So I can use either the original fix (for "3Dmigoto mode") or an "empty" fix for CM.

My original display name is 3d4dd - for some reason Nvidia changed it..?!

Posted 03/05/2016 02:59 PM   
What about those png's not loading masks into the resources? Is it a bug or it's just not implemented yet?
What about those png's not loading masks into the resources? Is it a bug or it's just not implemented yet?

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 03/05/2016 04:12 PM   
I want to put a question: It is true that 3DMigoto ignores the bin files in ShaderFixes if no txt file with the same hash/crc is found? Is there an option to use the bin files without the txt? Also, if I have the "reasm.bin" and the ".txt" it seems the wrapper decides to generate the "reasm.txt" files as well and possibly overwriting the "reasm.bin" files in which case it seems redundant to release a fix with only the .bin files...:(
I want to put a question:

It is true that 3DMigoto ignores the bin files in ShaderFixes if no txt file with the same hash/crc is found?
Is there an option to use the bin files without the txt?

Also, if I have the "reasm.bin" and the ".txt" it seems the wrapper decides to generate the "reasm.txt" files as well and possibly overwriting the "reasm.bin" files in which case it seems redundant to release a fix with only the .bin files...:(

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 03/05/2016 05:53 PM   
[quote="helifax"]I want to put a question: It is true that 3DMigoto ignores the bin files in ShaderFixes if no txt file with the same hash/crc is found? Is there an option to use the bin files without the txt? Thx;)[/quote] Yes, that's correct. I've already asked for some switch in the ini file which would allow to read shaders just from bin files.
helifax said:I want to put a question:

It is true that 3DMigoto ignores the bin files in ShaderFixes if no txt file with the same hash/crc is found?
Is there an option to use the bin files without the txt? Thx;)


Yes, that's correct. I've already asked for some switch in the ini file which would allow to read shaders just from bin files.

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 03/05/2016 05:57 PM   
[quote="Oomek"][quote="helifax"]I want to put a question: It is true that 3DMigoto ignores the bin files in ShaderFixes if no txt file with the same hash/crc is found? Is there an option to use the bin files without the txt? Thx;)[/quote] Yes, that's correct. I've already asked for some switch in the ini file which would allow to read shaders just from bin files.[/quote] Yeah also a FLAG to disable the generation of EXTRA _reasm.txt files would be welcome! I understand why that one is there...but at 26k shader source I get 26k .bin file + another _26k USELESS in Release mode _reasm.txt files. That is a huge amount of 78k files in a folder that windows + the wrapper needs to parse when loading shaders. I bet this is why the ROTTR slows down when swapping shaders:(
Oomek said:
helifax said:I want to put a question:

It is true that 3DMigoto ignores the bin files in ShaderFixes if no txt file with the same hash/crc is found?
Is there an option to use the bin files without the txt? Thx;)


Yes, that's correct. I've already asked for some switch in the ini file which would allow to read shaders just from bin files.


Yeah also a FLAG to disable the generation of EXTRA _reasm.txt files would be welcome! I understand why that one is there...but at 26k shader source I get 26k .bin file + another _26k USELESS in Release mode _reasm.txt files.

That is a huge amount of 78k files in a folder that windows + the wrapper needs to parse when loading shaders. I bet this is why the ROTTR slows down when swapping shaders:(

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 03/05/2016 06:02 PM   
Catching up on this thread... [quote="helifax"]Yeah also a FLAG to disable the generation of EXTRA _reasm.txt files would be welcome! I understand why that one is there...but at 26k shader source I get 26k .bin file + another _26k USELESS in Release mode _reasm.txt files. That is a huge amount of 78k files in a folder that windows + the wrapper needs to parse when loading shaders. I bet this is why the ROTTR slows down when swapping shaders:( [/quote]I think we can probably just disable generating these altogether now - cmd_Decompiler can be used to assemble and disassemble a shader if we suspect the assembler may be doing something wrong. [quote="Oomek"]What about those png's not loading masks into the resources? Is it a bug or it's just not implemented yet?[/quote]By 'mask' do you mean alpha channel? We rely on DirectTK to load textures from file and I don't see any switches to enable or disable the alpha channel. How are you checking if the alpha channel has been loaded? Keep in mind of course that DirectX won't automatically use alpha blending unless the game has enabled it, or you can enable it in a custom shader section with something like 'blend = ADD SRC_ALPHA INV_SRC_ALPHA', or just to check you could write the .w component of the texture out as .xyz. [quote="3d4dd"]The reason is that in ROTTR there are some areas where the performance on my weak PC is so bad with 3Dmigoto (<20 FPS even with all settings on low) that I would like to switch to CM for this special situations (which allows me to play on much higher settings and still better performance). But CM is messed up by the 3Dmigoto fixes so I have to disable them - preferably without restarting the game every time. I have found a work around: I set hunting=2 in d3dx.ini. I make 2 folders, one with the content of the original ShaderFixes folder and one empty. With autohotkey I rename in the background one of the two folders to "ShaderFixes" while the game is running and press F10 to reload the shader fixes. So I can use either the original fix (for "3Dmigoto mode") or an "empty" fix for CM.[/quote]Hmmm, I wonder if there is any way to detect if CM is enabled and switch to the original shaders and/or set StereoParams.x to 0 (plus display a message telling new users how to switch to real 3D since we see a lot of newbies don't realise that)? I haven't seen anything in nvapi to detect this unfortunately, but maybe there's something in the NDA version (the list of function names in the NDA version published on /. predates the addition of CM, so without the NDA version myself I have no way to know), or maybe we can find a call that behaves differently...? [quote="bo3b"]Taking a quick look here- this is probably happening because the fix is using so many ASM shaders, and that section of code in 3Dmigoto is not complete. It looks to me like we are generating an _reasm.txt and a _reasm.bin file on every file that is loaded. And secondarily, we don't create a .bin cache for ASM shaders, nor do we read the _reasm.bin which is roughly the same thing. So... Unless I've misread this, we are not only not caching the ASM results, we are regenerating them for every new shader seen. Which with this game using 1000s and 1000s is clearly a problem. Unless DarkStarSword gets to this earlier, I'll likely fix this this weekend. (In our good friend: HackerDevice::ReplaceShader)[/quote]I'm quite busy right now so please go ahead and do so - I'll stay out of that code for now so I don't step on your toes :)
Catching up on this thread...

helifax said:Yeah also a FLAG to disable the generation of EXTRA _reasm.txt files would be welcome! I understand why that one is there...but at 26k shader source I get 26k .bin file + another _26k USELESS in Release mode _reasm.txt files.

That is a huge amount of 78k files in a folder that windows + the wrapper needs to parse when loading shaders. I bet this is why the ROTTR slows down when swapping shaders:(

I think we can probably just disable generating these altogether now - cmd_Decompiler can be used to assemble and disassemble a shader if we suspect the assembler may be doing something wrong.

Oomek said:What about those png's not loading masks into the resources? Is it a bug or it's just not implemented yet?
By 'mask' do you mean alpha channel? We rely on DirectTK to load textures from file and I don't see any switches to enable or disable the alpha channel. How are you checking if the alpha channel has been loaded? Keep in mind of course that DirectX won't automatically use alpha blending unless the game has enabled it, or you can enable it in a custom shader section with something like 'blend = ADD SRC_ALPHA INV_SRC_ALPHA', or just to check you could write the .w component of the texture out as .xyz.

3d4dd said:The reason is that in ROTTR there are some areas where the performance on my weak PC is so bad with 3Dmigoto (<20 FPS even with all settings on low) that I would like to switch to CM for this special situations (which allows me to play on much higher settings and still better performance). But CM is messed up by the 3Dmigoto fixes so I have to disable them - preferably without restarting the game every time.
I have found a work around: I set hunting=2 in d3dx.ini. I make 2 folders, one with the content of the original ShaderFixes folder and one empty. With autohotkey I rename in the background one of the two folders to "ShaderFixes" while the game is running and press F10 to reload the shader fixes. So I can use either the original fix (for "3Dmigoto mode") or an "empty" fix for CM.
Hmmm, I wonder if there is any way to detect if CM is enabled and switch to the original shaders and/or set StereoParams.x to 0 (plus display a message telling new users how to switch to real 3D since we see a lot of newbies don't realise that)? I haven't seen anything in nvapi to detect this unfortunately, but maybe there's something in the NDA version (the list of function names in the NDA version published on /. predates the addition of CM, so without the NDA version myself I have no way to know), or maybe we can find a call that behaves differently...?

bo3b said:Taking a quick look here- this is probably happening because the fix is using so many ASM shaders, and that section of code in 3Dmigoto is not complete. It looks to me like we are generating an _reasm.txt and a _reasm.bin file on every file that is loaded. And secondarily, we don't create a .bin cache for ASM shaders, nor do we read the _reasm.bin which is roughly the same thing.

So... Unless I've misread this, we are not only not caching the ASM results, we are regenerating them for every new shader seen. Which with this game using 1000s and 1000s is clearly a problem.

Unless DarkStarSword gets to this earlier, I'll likely fix this this weekend. (In our good friend: HackerDevice::ReplaceShader)
I'm quite busy right now so please go ahead and do so - I'll stay out of that code for now so I don't step on your toes :)

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 03/06/2016 02:23 AM   
[quote="DarkStarSword"]By 'mask' do you mean alpha channel? We rely on DirectTK to load textures from file and I don't see any switches to enable or disable the alpha channel. How are you checking if the alpha channel has been loaded? Keep in mind of course that DirectX won't automatically use alpha blending unless the game has enabled it, or you can enable it in a custom shader section with something like 'blend = ADD SRC_ALPHA INV_SRC_ALPHA', or just to check you could write the .w component of the texture out as .xyz. [/quote] Yes, the alpha channel from png's. I'm not using any custom shader for that. I'm just sampling the resource's .w channel but it's all white.
DarkStarSword said:By 'mask' do you mean alpha channel? We rely on DirectTK to load textures from file and I don't see any switches to enable or disable the alpha channel. How are you checking if the alpha channel has been loaded? Keep in mind of course that DirectX won't automatically use alpha blending unless the game has enabled it, or you can enable it in a custom shader section with something like 'blend = ADD SRC_ALPHA INV_SRC_ALPHA', or just to check you could write the .w component of the texture out as .xyz.


Yes, the alpha channel from png's. I'm not using any custom shader for that. I'm just sampling the resource's .w channel but it's all white.

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 03/06/2016 03:09 AM   
It works fine for me: [img]http://darkstarsword.net/screenshots/FCPrimal/FCPrimal%20-%202016-03-06%20-%20152632.0.jps[/img] d3dx.ini: [code] [ResourceDebug2D] filename=3DMigoto.png [CustomShaderDebug2D] vs = ShaderFixes\full_screen.hlsl ps = ShaderFixes\debug_2d.hlsl blend = ADD SRC_ALPHA INV_SRC_ALPHA cull = none topology = triangle_strip o0 = bb ps-t100 = ResourceDebug2D Draw = 4, 0 post ps-t100 = null [Present] run = CustomShaderDebug2D [/code] full_screen.hlsl: [code] void main( out float4 pos : SV_Position0, out float4 spos : TEXCOORD0, out float2 tpos : TEXCOORD1, uint vertex : SV_VertexID) { // Not using vertex buffers so manufacture our own coordinates. switch(vertex) { case 0: pos.xy = float2(-1, -1); break; case 1: pos.xy = float2(-1, 1); break; case 2: pos.xy = float2(1, -1); break; case 3: pos.xy = float2(1, 1); break; default: pos.xy = 0; break; }; pos.zw = float2(0, 1); spos = pos; tpos = pos.xy * float2(0.5,-0.5) + 0.5; } [/code] debug_2d.hlsl: [code] Texture2D<float4> tex : register(t100); Texture1D<float4> IniParams : register(t120); void main(float4 pos : SV_Position0, float4 spos: TEXCOORD0, float2 tpos: TEXCOORD1, out float4 result : SV_Target0) { uint width, height; tex.GetDimensions(width, height); result = tex.Load(int3(tpos.xy * float2(width, height), 0)); } [/code]
It works fine for me:
Image

d3dx.ini:
[ResourceDebug2D]
filename=3DMigoto.png

[CustomShaderDebug2D]
vs = ShaderFixes\full_screen.hlsl
ps = ShaderFixes\debug_2d.hlsl
blend = ADD SRC_ALPHA INV_SRC_ALPHA
cull = none
topology = triangle_strip
o0 = bb
ps-t100 = ResourceDebug2D
Draw = 4, 0
post ps-t100 = null

[Present]
run = CustomShaderDebug2D


full_screen.hlsl:
void main(
out float4 pos : SV_Position0,
out float4 spos : TEXCOORD0,
out float2 tpos : TEXCOORD1,
uint vertex : SV_VertexID)
{
// Not using vertex buffers so manufacture our own coordinates.
switch(vertex) {
case 0:
pos.xy = float2(-1, -1);
break;
case 1:
pos.xy = float2(-1, 1);
break;
case 2:
pos.xy = float2(1, -1);
break;
case 3:
pos.xy = float2(1, 1);
break;
default:
pos.xy = 0;
break;
};
pos.zw = float2(0, 1);
spos = pos;
tpos = pos.xy * float2(0.5,-0.5) + 0.5;
}


debug_2d.hlsl:
Texture2D<float4> tex : register(t100);
Texture1D<float4> IniParams : register(t120);

void main(float4 pos : SV_Position0, float4 spos: TEXCOORD0, float2 tpos: TEXCOORD1, out float4 result : SV_Target0)
{
uint width, height;
tex.GetDimensions(width, height);

result = tex.Load(int3(tpos.xy * float2(width, height), 0));
}

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 03/06/2016 04:31 AM   
@DarkStarSword Ok, when the mask is stored as a layer's transparency it works, but when the mask is stored as an extra channel it doesn't. I actually first checked the BMP then I've tried PNG, but forgot that the mask in PNG needs to be consolidated with the layer, but I need to keep it separate, so the only option is BMP, but the alpha channel from BMP shows as all white. Would you please check if that BMP is showing fine for you? [url]https://www.dropbox.com/s/0xpwk2dejezwwmp/3dmigoto.alpha.bmp[/url] edit: Ok, seems like the BMP has only issues, I saved the file as raw dds and it's working fine. I'll just use this format.
@DarkStarSword Ok, when the mask is stored as a layer's transparency it works, but when the mask is stored as an extra channel it doesn't.

I actually first checked the BMP then I've tried PNG, but forgot that the mask in PNG needs to be consolidated with the layer, but I need to keep it separate, so the only option is BMP, but the alpha channel from BMP shows as all white.

Would you please check if that BMP is showing fine for you?

https://www.dropbox.com/s/0xpwk2dejezwwmp/3dmigoto.alpha.bmp

edit: Ok, seems like the BMP has only issues, I saved the file as raw dds and it's working fine. I'll just use this format.

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 03/06/2016 11:31 AM   
Hmm.. last I checked BMPs don't have an Alpha Channel as they only have RGB channels. PNGs on the other hand have the Alpha Channel embedded inside. Or... am I missing something? The BMP shows fine but there is no transparency...just a black background.
Hmm.. last I checked BMPs don't have an Alpha Channel as they only have RGB channels. PNGs on the other hand have the Alpha Channel embedded inside.
Or... am I missing something?

The BMP shows fine but there is no transparency...just a black background.

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 03/06/2016 11:36 AM   
BMP's can be saved as RGB 24bit or ARGB 32bit. Don't save that picture by right clicking, press the ... in the upper right corner and then download. Open in photoshop and switch to channels tab.
BMP's can be saved as RGB 24bit or ARGB 32bit. Don't save that picture by right clicking, press the ... in the upper right corner and then download. Open in photoshop and switch to channels tab.

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 03/06/2016 12:29 PM   
Be sure to select "Save color values from transparent pixels" when exporting a png, or the equivalent option in your image editor. If the channel is not saved as an alpha channel I do not expect it to load since it's meaning is undefined. It has been about 12 years since I looked at the .bmp file format, but if memory serves a 32bit bitmap has 24 RGB bits and 8 unused bits. Some image editors / viewers may treat those 8 bits as an alpha channel (and I have written [url=https://github.com/DarkStarSword/sunproject/releases]an application[/url] that did that in the past) but that is an application specific meaning, and unless it is officially defined as an alpha channel these days I do not consider ignoring them to be a bug. If memory serves, the only reason the format even supports 32bits was because it was the format MS used internally (the win32 api used to have several data structures used by StretchDIBBits() and others that exactly matched the .bmp format) and had to match the bit size of the hardware, and some hardware could not cope with 24bit image data (we're talking Windows 95 era).
Be sure to select "Save color values from transparent pixels" when exporting a png, or the equivalent option in your image editor.

If the channel is not saved as an alpha channel I do not expect it to load since it's meaning is undefined.

It has been about 12 years since I looked at the .bmp file format, but if memory serves a 32bit bitmap has 24 RGB bits and 8 unused bits. Some image editors / viewers may treat those 8 bits as an alpha channel (and I have written an application that did that in the past) but that is an application specific meaning, and unless it is officially defined as an alpha channel these days I do not consider ignoring them to be a bug. If memory serves, the only reason the format even supports 32bits was because it was the format MS used internally (the win32 api used to have several data structures used by StretchDIBBits() and others that exactly matched the .bmp format) and had to match the bit size of the hardware, and some hardware could not cope with 24bit image data (we're talking Windows 95 era).

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 03/06/2016 01:22 PM   
[quote="DarkStarSword"]Be sure to select "Save color values from transparent pixels" when exporting a png, or the equivalent option in your image editor. If the channel is not saved as an alpha channel I do not expect it to load since it's meaning is undefined. It has been about 12 years since I looked at the .bmp file format, but if memory serves a 32bit bitmap has 24 RGB bits and 8 unused bits. Some image editors / viewers may treat those 8 bits as an alpha channel (and I have written [url=https://github.com/DarkStarSword/sunproject/releases]an application[/url] that did that in the past) but that is an application specific meaning, and unless it is officially defined as an alpha channel these days I do not consider ignoring them to be a bug. If memory serves, the only reason the format even supports 32bits was because it was the format MS used internally (the win32 api used to have several data structures used by StretchDIBBits() and others that exactly matched the .bmp format) and had to match the bit size of the hardware, and some hardware could not cope with 24bit image data (we're talking Windows 95 era). [/quote] Ooooh, I see. I'll stick to dds files then. Thanks for a history lesson mate :)
DarkStarSword said:Be sure to select "Save color values from transparent pixels" when exporting a png, or the equivalent option in your image editor.

If the channel is not saved as an alpha channel I do not expect it to load since it's meaning is undefined.

It has been about 12 years since I looked at the .bmp file format, but if memory serves a 32bit bitmap has 24 RGB bits and 8 unused bits. Some image editors / viewers may treat those 8 bits as an alpha channel (and I have written an application that did that in the past) but that is an application specific meaning, and unless it is officially defined as an alpha channel these days I do not consider ignoring them to be a bug. If memory serves, the only reason the format even supports 32bits was because it was the format MS used internally (the win32 api used to have several data structures used by StretchDIBBits() and others that exactly matched the .bmp format) and had to match the bit size of the hardware, and some hardware could not cope with 24bit image data (we're talking Windows 95 era).


Ooooh, I see. I'll stick to dds files then. Thanks for a history lesson mate :)

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 03/06/2016 01:37 PM   
Like DSS said above, I've yet to come on an BMP that supports Alpha Channel. The only format I've known BMP is to be RGB24 +8 unused bits. That's why you either use dds or png formats... I could be mistaken though;)
Like DSS said above, I've yet to come on an BMP that supports Alpha Channel. The only format I've known BMP is to be RGB24 +8 unused bits. That's why you either use dds or png formats...

I could be mistaken though;)

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 03/06/2016 03:02 PM   
Seems like only photoshop is smart enough to take advantage of those orphaned bits :)
Seems like only photoshop is smart enough to take advantage of those orphaned bits :)

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 03/06/2016 03:30 PM   
  60 / 141    
Scroll To Top