Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (alibaba, vicknick), 1,492 guests, and 4 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
Normal map + panel? [FIXED, PLEASE REMOVE] #399480
04/16/12 03:23
04/16/12 03:23
Joined: Apr 2005
Posts: 796
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 796
U.S.A. Michigan
Hey there. I am looking to find a way to display a normal map over a panel. Anyone have any ideas/ways to achieve this? Thanks!

FYI: The normal map is for a "visor" effect.



This is a pic of the shader I have in action. Literally all I need is for a way to get the purple area (normal map) to fill the whole screen.

Last edited by exile; 04/16/12 22:28.
Re: Normal map + panel? [Re: exile] #399487
04/16/12 07:35
04/16/12 07:35
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
you need a post processing shader for that, not a panel.


3333333333
Re: Normal map + panel? [Re: Quad] #399495
04/16/12 14:20
04/16/12 14:20
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
or use ent_createlayer to create a view entity (with your Panel BG as Skin). add a normal mapping shader to it and be happy. (don´t forget to create a dynamic View light too)


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Normal map + panel? [Re: Espér] #399515
04/16/12 17:09
04/16/12 17:09
Joined: Apr 2005
Posts: 796
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 796
U.S.A. Michigan
I did what you said Esper, so I just need to know how to create a dynamic view light?

Its sad I couldnt get my version to work. I know it can work because the "rain_drop" shader on the wiki uses the same method im looking for! In fact, I was using the raindrop shader as the base for my shader, but I just couldnt get the image to fill the screen. I figured someone here would be able to tell me how to do that...

The example I showed was just me disabling the refraction. With the refraction enabled, it looks like this...



As you can see, the effect is working, it just needs to be scaled properly.

For anyone interested, heres the shader I am working with...

Code:
texture TargetMap;
texture mtlSkin1;

sampler postTex = sampler_state
{
   texture = (TargetMap);
	MinFilter	= linear;
	MagFilter	= linear;
	MipFilter	= linear;
	
	AddressU		= Wrap;
	AddressV		= Wrap;
};

sampler bumpTex = sampler_state
{
   texture = (mtlSkin1);
	MinFilter	= linear;
	MagFilter	= linear;
	MipFilter	= linear;
	
	AddressU		= Wrap;
	AddressV		= Wrap;
};

float4 PS_RainDrops(float2 tex0 : TEXCOORD0) : COLOR
{
	float2 temp;
	temp.x = tex0.x;
	temp.y = tex0.y;
   float2 pixel = tex2D(bumpTex,temp).rg*5;
   temp.x = (tex0.x + pixel.x * 0.01f);
   temp.y = (tex0.y + pixel.y * 0.01f);
   return float4(tex2D(postTex,temp*(1-pixel.x * 0.01f)).rgb,1.0);
}

technique tech_00
{
   pass pass_00
   {
      PixelShader = compile ps_2_0 PS_RainDrops();
   }
}

technique fallback { pass one { } }



Last edited by exile; 04/16/12 17:28.
Re: Normal map + panel? [Re: exile] #399536
04/16/12 21:49
04/16/12 21:49
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
Try a power of two texture?

Re: Normal map + panel? [Re: exile] #399539
04/16/12 22:13
04/16/12 22:13
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
what size is the img?

Re: Normal map + panel? [Re: lostclimate] #399540
04/16/12 22:15
04/16/12 22:15
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
The issue has been fixed already, it was indeed the resolution of the texture.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Normal map + panel? [Re: Superku] #399541
04/16/12 22:29
04/16/12 22:29
Joined: Apr 2005
Posts: 796
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 796
U.S.A. Michigan
yes, superku saves the day again!

Fixed, and thanks for everyone who suggested a solution!


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