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
0 registered members (), 900 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
Emulating bitwise operations #418278
02/22/13 22:17
02/22/13 22:17
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline OP
Member
jenGs  Offline OP
Member
J

Joined: Jul 2010
Posts: 283
Germany
Hi,

I need bitwise operations in a shader.
But I learned that this is not possible with d3d9.
Is there a way to emulate this behaviour.

For Example:
int val = anotherVal & 0xffffffff;

Patrick

Re: Emulating bitwise operations [Re: jenGs] #418281
02/22/13 22:24
02/22/13 22:24
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Maybe the following blog entry is a solution for you:

http://orenk2k.blogspot.de/2011/05/bitwise-operators-on-low-end-gpus.html


Always learn from history, to be sure you make the same mistakes again...
Re: Emulating bitwise operations [Re: Uhrwerk] #418283
02/22/13 22:29
02/22/13 22:29
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline OP
Member
jenGs  Offline OP
Member
J

Joined: Jul 2010
Posts: 283
Germany
Wow, this was fast laugh
Thank you for the link.
I need to study it and try some things, before I realy understand it, but it is a much better solution than what came up on my previous google searches.

Re: Emulating bitwise operations [Re: jenGs] #418286
02/22/13 22:39
02/22/13 22:39
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
It's basically a lookup table for all the binary operators where the result of one operator is stored in one channel of the texture.


Always learn from history, to be sure you make the same mistakes again...

Moderated by  Blink, Hummel, Superku 

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