Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - cremen

Pages: [1] 2
1
Привет, мне н

2
Other shaders demo comming soon.

And light DON'T AFFECT at the border. It is not bug, it is feature.

3
Quote
texture g_MeshTexture : DiffuseMap;
Cool. I think you need to add this trick at the help. 8)

 

4
Feature requests, suggestions / Shader control request.
« on: October 03, 2009, 08:55:20 AM »
Need a script command for runtime change shader constants. Something like this:
actor.SetShaderConstantVec4( "BorderColor", 1.0, 0.0, 0.0, 0.0 );
actor.SetShaderConstantVec1( "BorderWidth", 5.0 );
actor.SetTexture( "g_MeshTexture", "actors\\fx\\glow12.jpg");
Additionaly needs the shader constant setters in actor definition file. (like texture setting, constant and others)

where constants defined like this:
Code: [Select]
float4 BorderColor = { 1.0, 0.0, 0.0, 0.7 };
float BorderWidth = 4.0;

texture g_MeshTexture<
    string ResourceName = "actors\\inga\\inga.jpg";
>;

5
First of all, feature request:
Need a script command for runtime change shader constants. Something like this (look a shader constant at border shader):
actor.SetShaderConstantVec4( "BorderColor", 1.0, 0.0, 0.0, 0.0 );
actor.SetShaderConstantVec1( "BorderWidth", 5.0 );
actor.SetTexture( "GlowTexture", "actors\glow12.jpg");
Additionaly needs the shader constant setters in actor definition file. (like texture setting, constant and others)

Border shader (Simple outer glow). Useful for some selection effects. (Sometimes for 'show hidden objects' effect with one trick)
Code: WME Script
  1. float4x4 Wm: World;                 // World matrix for object
  2. float4x4 WvpM: WorldViewProjection;    // World * View * Projection matrix
  3. float4   LightPos: ActorLightPos;
  4.  
  5. float4 BorderColor = { 1.0, 0.0, 0.0, 0.7 };
  6. float BorderWidth = 4.0;
  7.  
  8. texture g_MeshTexture<
  9.     string ResourceName = "actors\\inga\\inga.jpg";
  10. >;
  11.  
  12. // Data structure for Vertex Shaders
  13. struct invs_data {
  14.     float4 Position     : POSITION;
  15.     float3 Normal       : NORMAL;
  16.     float2 UV      : TEXCOORD0;
  17. };
  18.  
  19. // Data structure for Pixel color shader
  20. struct outvs_data {
  21.     float4 Position     : POSITION;
  22.     float2 UV      : TEXCOORD0;
  23.         float4 Diffuse  : COLOR0;
  24. };
  25.  
  26. outvs_data VertShader(invs_data IN){
  27.         float4 pos = mul(IN.Position, WvpM);
  28.         float3 lightDir = normalize(LightPos-pos);
  29.  
  30.         outvs_data OUT = (outvs_data)0;
  31.         OUT.UV = IN.UV;
  32.         OUT.Diffuse = dot( IN.Normal, lightDir );
  33.         OUT.Position = pos;
  34.         return OUT;
  35. }
  36.  
  37. sampler MeshTextureSampler =
  38. sampler_state
  39. {
  40.     Texture = <g_MeshTexture>;
  41.     MipFilter = LINEAR;
  42.     MinFilter = LINEAR;
  43.     MagFilter = LINEAR;
  44. };
  45.  
  46. float4 PixShader(outvs_data IN): COLOR0 {
  47.         float4 col = max(0.4, IN.Diffuse) * tex2D(MeshTextureSampler, IN.UV);
  48.         return float4( col.xyz, 1.0);
  49. }
  50.  
  51. float4 GlowVertShader(invs_data IN): POSITION{
  52.         float4 pos = mul(IN.Position, WvpM);
  53.         float4 nrm = normalize(mul(IN.Normal, WvpM));
  54.         return pos + nrm * BorderWidth;
  55. }
  56. float4 GlowPixShader(float4 pos: POSITION): COLOR0 {
  57.         return BorderColor;
  58. }
  59.  
  60. technique Main{
  61.          pass glowPass{
  62.                 VertexShader = compile vs_2_0 GlowVertShader();
  63.                 PixelShader = compile ps_2_0 GlowPixShader();
  64.                 ZWriteEnable=false;
  65.                 //ZTest=true;
  66.                 CullMode = None;
  67.         }
  68.         pass colorPass{
  69.                 VertexShader = compile vs_2_0 VertShader();
  70.                 PixelShader = compile ps_2_0 PixShader();
  71.                 ZEnable=true;
  72.                 ZWriteEnable=true;
  73.                 //CullMode = None;
  74.         }
  75. }
  76.  

Result:


To be continued, stay turned.

6
Many BIG thanks for this release!!!

(black background from ProjectMan... no color choice)

WME ::rock


7
Техниче�?кий фор�?м / Re: Шейдеры. Кто
« on: September 27, 2009, 03:01:24 PM »
Пока добил про

8
Техниче�?кий фор�?м / Re: Шейдеры. Кто
« on: September 27, 2009, 07:37:30 AM »
Сиж

9
Just subject. Not only black, may be custom picture or just color;

Thanks for your superb engine.

10
Общий фор�?м / PinkTown: Destination Lola
« on: September 25, 2009, 02:29:42 PM »
Недавно обнар

11
Can't reproduce / Re: Project dont run from ProjectMan.
« on: February 14, 2009, 05:18:37 PM »
yes, i know. but... removing the space solved my problem.

12
Can't reproduce / Re: Project dont run from ProjectMan.
« on: February 14, 2009, 11:27:49 AM »
ok, i solved.

my path to problem:
from win+R -> "c:\Program Files\WME DevKit\wme.exe" -project "c:\Documents\pinkTown Project\theGame\PinkTown.wpr"
it give me some error.
do magic
from win+R -> "c:\Program Files\WME DevKit\wme.exe" -project "c:\Documents\pinkTown\theGame\PinkTown.wpr"
its work!

Path to project file contain space symbol!!! That's all. removing it solved my problem.
Thankx for your time.

13
Can't reproduce / Re: Project dont run from ProjectMan.
« on: February 14, 2009, 10:40:19 AM »
ok, with sound's files my mistake. (but why it worked at first windows instance... hm, may be i missing something)

wme.log, generated only by compiled exe.

may be ProjectMan.log?
[code]
08:54: ********** DEBUG LOG OPENED 14-02-2009 (Release Build) *****************
08:54: Wintermute Engine ver 1.8.9beta, Compiled on Dec 20 2008, 13:01:44
08:54: Platform: Windows XP or higher  (Build 7000)
08:54: DirectX version: 9.0
08:54:
08:54: Scanning packages...
08:54:   Registered 0 files in 0 package(s)
08:54: Initializing scripting engine...
08:54:   Script compiler bound successfuly
08:54: Loading plugins...
08:54:   wme_sample_pixel.dll
08:54:   wme_snow.dll
08:54: Scanning packages...
08:54:   Registered 0 files in 0 package(s)
08:54: Enumerating Direct3D devices...
08:54: Enumerating DirectSound devices...
08:54: Game aspect ratio:    -1.#IND00
08:54: Monitor aspect ratio: 1.600000
08:54: Game aspect ratio is the same as monitor aspect ratio.
08:54: Backup resolution:  0 x 0
08:54:
08:54: Available video devices:
08:54:   ATI Mobility Radeon HD 3400 Series (Prerelease - WDDM 1.1)  (accelerated)
08:54:     Driver: atiumdag.dll 8.14.10.630
08:54:     Monitor: 0
08:54: Available audio devices:
08:54:   Первичный зв

14
Can't reproduce / Re: Project dont run from ProjectMan.
« on: February 14, 2009, 06:42:27 AM »
also:
1. Run WME as Admin don't solve problem.
2. Create new project at c:\users\...\Documents\WME projects\ don't solve problem

compiled exe run fine, except some strange things:
1. my project structure:
Data [primary package]
  some script, with Game.PlaySound( "sounds/gui/click.ogg" );           
  and other script, with Game.PlaySound( "sounds/steps/wood_step.ogg" );
Sounds [package]
  gui/click.ogg
  steps/wood_step.ogg
Video [Package]

ok. at the first instance (yep Windows 7, beta 7000), all sounds played good, all works fine.
but at second (current Windows) instance - some sounds won't to be played, and some sounds played good.
if i removed package name from sound path (like "sounds/gui/click.ogg" -> "gui/click.ogg") sound starts playing...

All this is looks like path determine error... not a User\Admin Rights\UAC settings bug.


Modified:
BUT (it is VERY strange) sound from Game.PlaySound( "sounds/steps/wood_step.ogg" ); played good!!! without any changing the sound file path... i have no idea WTF. may be more logs can help? is it present "more debug" version of the projectman (or engine)?

15
Can't reproduce / Re: Project dont run from ProjectMan.
« on: February 14, 2009, 06:06:32 AM »
1. UAC disabled.
2. It is second instance of Windows 7 (i have two). At first instance all works good (and with enabled UAC too). At current instance - not.
3. Demo projects located in the Program Files, My project located at the c:\documents\pinktown\theGame\.

Pages: [1] 2

Page created in 0.769 seconds with 23 queries.