Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (howardR, 7th_zorro), 893 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[solved] explain bmap_process, please #444535
08/13/14 16:25
08/13/14 16:25
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline OP
Member
jenGs  Offline OP
Member
J

Joined: Jul 2010
Posts: 283
Germany
Hallo,

I have a problem with bmap_process.

I get, that I can only use bitmaps sizes that are a power of two.

But if I process a bitmap with 2048 (my calculator says it is 2^11 ergo a power of two) the texture coordinates are messed up.

I wrote this testshader:

Code:
float4 process_test(in float2 tex: TEXCOORD0): COLOR 
{	
	return float4(tex.x, tex.y, tex.x, tex.y);
}



And wrote the result per bmap_process into a 32bit floating point bitmap.

Code:
BMAP *test = bmap_createblack(2048, 2048, 14);
	
bmap_process(test, test, mtlProjectText);
	
bmap_to_format(test, 14);
	
bmap_lock(test, 0);
	
float *bits = test.finalbits;
	
str_for_float(deb1, bits[2047]);
	
bmap_unlock(test);



result is 0.8...

if the bitmap is 1024 result is 0.99....


So why?

Last edited by jenGs; 08/14/14 11:07.
Re: explain bmap_process, please [Re: jenGs] #444568
08/14/14 10:11
08/14/14 10:11
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
You need to increase the zbuffer size with bmap_zbuffer. Don't ask me why, but this should work wink


Visit my site: www.masterq32.de
Re: explain bmap_process, please [Re: MasterQ32] #444575
08/14/14 11:07
08/14/14 11:07
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline OP
Member
jenGs  Offline OP
Member
J

Joined: Jul 2010
Posts: 283
Germany
thank you, thank you, thank you! laugh
I never would have guessed that.
Now I can move on with my procedural stuff.


Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1