[Python-ogre-commit] SF.net SVN: python-ogre: [446] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
|
From: <and...@us...> - 2007-10-20 00:42:27
|
Revision: 446
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=446&view=rev
Author: andy_miller
Date: 2007-10-19 17:42:29 -0700 (Fri, 19 Oct 2007)
Log Message:
-----------
Updates for Caelum to match the 1.1.b patch release
Modified Paths:
--------------
trunk/python-ogre/ChangeLog.txt
trunk/python-ogre/demos/caelum/Demo_Caelum01.py
trunk/python-ogre/demos/caelum/media/CaelumShaders.cg
trunk/python-ogre/demos/caelum/media/LayeredClouds.material
trunk/python-ogre/demos/caelum/media/Terrain.material
trunk/python-ogre/setup.py
Added Paths:
-----------
trunk/python-ogre/demos/caelum/media/CaelumDemoTerrain.cfg
trunk/python-ogre/demos/caelum/media/GroundFog.material
trunk/python-ogre/demos/caelum/media/GroundFog.program
trunk/python-ogre/demos/caelum/media/Haze.program
trunk/python-ogre/demos/caelum/media/SunGradient.png
Modified: trunk/python-ogre/ChangeLog.txt
===================================================================
--- trunk/python-ogre/ChangeLog.txt 2007-10-19 13:17:02 UTC (rev 445)
+++ trunk/python-ogre/ChangeLog.txt 2007-10-20 00:42:29 UTC (rev 446)
@@ -1,3 +1,16 @@
+October 20 2007: Version 1.1.b SnapShot
+========================================
+* Fixed Caelum demo
+
+October 19 2007: Version 1.1.a SnapShot
+========================================
+* Significant fixes to Bullet and OgreBullet modules
+* Added Caelum - "Sky" module
+* Updated QuickGui
+* Additions to Ogre Wrapper
+ setOptions and getOptions work
+
+
October 05 2007: Version 1.1 Release
====================================
* Built with Ogre 1.4.4+
Modified: trunk/python-ogre/demos/caelum/Demo_Caelum01.py
===================================================================
--- trunk/python-ogre/demos/caelum/Demo_Caelum01.py 2007-10-19 13:17:02 UTC (rev 445)
+++ trunk/python-ogre/demos/caelum/Demo_Caelum01.py 2007-10-20 00:42:29 UTC (rev 446)
@@ -90,15 +90,8 @@
# clamp to terrain
ret = TerrainFrameListener.frameStarted(self, frameEvent)
- t = self.caelumSystem.getSun().getSunPositionModel()
- espm = caelum.castAsEarthSunPositionModel ( t )
-
- if espm :
- espm.setJulianDate (self.caelumSystem.getUniversalClock ().getCurrentRelativeTime ())
-
- self.timeTillNextUpdate-= frameEvent.timeSinceLastFrame
-
## keyboard input
+ self.timeTillNextUpdate -= frameEvent.timeSinceLastFrame
if (self.timeTillNextUpdate<= 0):
if (self.Keyboard.isKeyDown (ois.KC_SPACE)):
self.timeTillNextUpdate = 1
@@ -123,11 +116,18 @@
self.PostFiltering = False
else:
self.PostFiltering = True
- ogre.CompositorManager.getSingleton().setCompositorEnabled (self.window.getViewport (0), "Bloom", self.postFiltering)
-
+ ogre.CompositorManager.getSingleton().setCompositorEnabled (self.window.getViewport (0), "Bloom", self.PostFiltering)
+
+ if self.caelumSystem.getSun():
+ t = self.caelumSystem.getSun().getSunPositionModel()
+ espm = caelum.castAsEarthSunPositionModel ( t )
+ if espm :
+ espm.setJulianDate (self.caelumSystem.getUniversalClock ().getCurrentRelativeTime ())
+
## EXTRA! Update the haze sun light position
mat = ogre.MaterialManager.getSingleton().getByName("CaelumDemoTerrain")
- mat.getTechnique(0).getPass("Haze").getVertexProgramParameters().setNamedConstant("sunDirection", self.caelumSystem.getSun().getSunDirection())
+ if mat:
+ mat.getTechnique(0).getPass("CaelumHaze").getVertexProgramParameters().setNamedConstant("sunDirection", self.caelumSystem.getSun().getSunDirection())
return ret
@@ -150,7 +150,12 @@
self.root.removeFrameListener(self.frameListener)
self.frameListener = None
print "deleted Listeners"
+ t = self.caelumSystem.getSun().setSunPositionModel(None)
+ print "Sun is None", t
+ t = self.caelumSystem.getSun().getSunPositionModel()
+ print "Sun is None", t
+
## ====================================================================
## This the one difference between the python and c++ demo. In c++ the
@@ -207,16 +212,9 @@
camera.setNearClipDistance(0.01)
## Initialise Caelum
- try:
- self.caelumSystem = caelum.CaelumSystem(self.root, self.sceneManager
- ,createSkyDome=skyDome, createClouds=clouds
- )
- except RuntimeError, e:
- print "\nError occured when creating the CaelumSystem - do you have a graphics card that supports vertex programs?\n"
- sys.exit(-1)
- except:
- print "Exception Occured:", sys.exc_info()[0]
- sys.exit(-1)
+ self.caelumSystem = caelum.CaelumSystem(self.root, self.sceneManager )
+# ,createSkyDome=skyDome, createClouds=clouds
+# )
## Setup sun position model.
self.spm = caelum.SimpleSunPositionModel (ogre.Degree (13))
@@ -234,8 +232,8 @@
## Basic fogging setup.
## This is a hack until proper fogging is implemented.
- self.caelumSystem.getSkyColourModel().setFogDensityMultiplier(0.0015)
- self.caelumSystem.setManageFog(True)
+# self.caelumSystem.getSkyColourModel().setFogDensityMultiplier(0.0015)
+# self.caelumSystem.setManageFog(True)
## Setup cloud options
if clouds:
Added: trunk/python-ogre/demos/caelum/media/CaelumDemoTerrain.cfg
===================================================================
--- trunk/python-ogre/demos/caelum/media/CaelumDemoTerrain.cfg (rev 0)
+++ trunk/python-ogre/demos/caelum/media/CaelumDemoTerrain.cfg 2007-10-20 00:42:29 UTC (rev 446)
@@ -0,0 +1,35 @@
+# Heightmap source
+PageSource=Heightmap
+
+# Heightmap-source specific settings
+Heightmap.image=terrain.png
+
+# How large is a page of tiles (in vertices)? Must be (2^n)+1
+PageSize=513
+
+# How large is each tile? Must be (2^n)+1 and be smaller than PageSize
+TileSize=65
+
+# The maximum error allowed when determining which LOD to use
+MaxPixelError=3
+
+# The size of a terrain page, in world units
+PageWorldX=1500
+PageWorldZ=1500
+
+# Maximum height of the terrain
+MaxHeight=100
+
+# Upper LOD limit
+MaxMipMapLevel=5
+
+# The proportional distance range at which the LOD morph starts to take effect
+# This is as a proportion of the distance between the current LODs effective range,
+# and the effective range of the next lower LOD
+LODMorphStart=0.2
+
+# Use vertex program to morph LODs, if available
+VertexProgramMorph=no
+
+# Caelum demo uses a custom material with fogging support.
+CustomMaterialName=CaelumDemoTerrain
Modified: trunk/python-ogre/demos/caelum/media/CaelumShaders.cg
===================================================================
--- trunk/python-ogre/demos/caelum/media/CaelumShaders.cg 2007-10-19 13:17:02 UTC (rev 445)
+++ trunk/python-ogre/demos/caelum/media/CaelumShaders.cg 2007-10-20 00:42:29 UTC (rev 446)
@@ -7,7 +7,7 @@
sunColour = sunColour * (1 - absorption) * half4 (0.9, 0.5, 0.09, 1);
- return sunColour * scatteredSunlight;
+ return sunColour * scatteredSunlight;
}
half fogExp (half z, half density) {
@@ -99,8 +99,8 @@
void Haze_fp (half haze : TEXCOORD0,
half2 sunlight : TEXCOORD1,
out half4 oCol : COLOR,
- uniform sampler atmRelativeDepth : register(s0),
- uniform sampler gradientsMap : register (s1),
+ uniform sampler1D atmRelativeDepth : register(s0),
+ uniform sampler2D gradientsMap : register (s1),
uniform half4 fogColour)
{
half incidenceAngleCos = sunlight.x;
@@ -133,3 +133,211 @@
oCol = hazeColour;
oCol.a = haze;
}
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+
+// Global cloud textures
+sampler cloud_shape1 : register(s0);
+sampler cloud_shape2 : register(s1);
+sampler cloud_detail : register(s2);
+
+// Global cloud parameters.
+uniform float cloudMassInvScale;
+uniform float cloudDetailInvScale;
+
+uniform float2 cloudMassOffset;
+uniform float2 cloudDetailOffset;
+
+uniform float cloudCover;
+uniform float cloudMassBlend;
+uniform float cloudDetailBlend;
+
+uniform float cloudSharpness;
+uniform float cloudThickness;
+uniform float cloudShininess;
+
+// Get cloud layer intensity at a certain point.
+float LayeredClouds_intensity(in float2 pos)
+{
+ // Calculate the base alpha
+ float2 finalMassOffset = cloudMassOffset + pos;
+ float aCloud = lerp(tex2D(cloud_shape1, finalMassOffset * cloudMassInvScale).r,
+ tex2D(cloud_shape2, finalMassOffset * cloudMassInvScale).r,
+ cloudMassBlend);
+ float aDetail = tex2D(cloud_detail, (cloudDetailOffset + pos) * cloudDetailInvScale).r;
+ aCloud = (aCloud + aDetail * cloudDetailBlend) / (1 + cloudDetailBlend);
+ return max(0, aCloud - (1 - cloudCover));
+}
+
+// Entry point for Cloud vertex program.
+void LayeredClouds_vp
+(
+ in float4 position : POSITION,
+ in float2 uv : TEXCOORD0,
+
+ out float4 oPosition : POSITION,
+ out float2 oUv : TEXCOORD0,
+ out float oGlow : TEXCOORD1,
+ out float3 relPosition : TEXCOORD2,
+
+ uniform float4x4 worldViewProj,
+ uniform float3 sunDirection
+) {
+ relPosition = normalize (position);
+ oGlow = dot (relPosition, normalize (-sunDirection));
+ oPosition = mul(worldViewProj, position);
+ oUv = uv;
+}
+
+// Entry point for Cloud fragment program.
+void LayeredClouds_fp
+(
+ in float2 uv : TEXCOORD0,
+ in float glow : TEXCOORD1,
+ in float3 relPosition : TEXCOORD2,
+
+ uniform float cameraHeight,
+ uniform float3 sunDirection,
+ uniform float4 sunColour,
+ uniform float4 fogColour,
+
+ out float4 oCol : COLOR
+) {
+ // Initialize output.
+ oCol.rgba = float4(1, 1, 1, 0);
+
+ // Get cloud intensity.
+ float intensity = LayeredClouds_intensity(uv);
+
+ // Opacity is exponential.
+ float aCloud = saturate(exp(cloudSharpness * intensity) - 1);
+
+ float shine = pow(saturate(glow), 8) / 4;
+ sunColour.rgb *= 1.5;
+ float3 cloudColour = fogColour.rgb * (1 - intensity / 3);
+ float thickness = saturate(0.8 - exp(-cloudThickness * (intensity + 0.2 - shine)));
+
+ oCol.rgb = lerp(sunColour.rgb, cloudColour.rgb, thickness);
+ //oCol.rgb = thickness;
+ //oCol.rgb = sunColour.rgb;
+ //oCol.rgb = cloudColour.rgb;
+
+ // bottom 20th of the sky clouds vanish.
+ // Simple and effective.e
+ aCloud *= saturate (20 * relPosition.y);
+
+ oCol.a = aCloud;
+ oCol.rgb = (oCol.rgb);
+}
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+
+// Return fogging through a layer of fog which drops exponentially by height.
+// Foginess at a certain point is exp(-verticalDecay * (h - fogLevel));
+// A fogLevel from the ground fogginess is 1.
+float ExpGroundFog (float invSinView, float h1, float h2,
+ float density, float verticalDecay, float fogLevel)
+{
+ // Integrate fog on a vertical line from h1 to h2.
+ float vFog = (-1 / verticalDecay) *
+ (exp (-verticalDecay * (h2 - fogLevel)) -
+ exp (-verticalDecay * (h1 - fogLevel)));
+ return 1 - exp (-density * invSinView * vFog);
+}
+
+// Just like ExpGroundFog with infinite h2
+float ExpGroundFogInf (float invSinView, float h1,
+ float density, float verticalDecay, float fogLevel)
+{
+ // Integrate fog on a vertical line from h1 to h2.
+ float vFog = exp (-verticalDecay * (h1 - fogLevel)) / verticalDecay;
+ return 1 - exp (-density * invSinView * vFog);
+}
+
+// Entry point for GroundFog vertex program.
+void GroundFog_vp
+(
+ float4 position : POSITION,
+
+ out float4 oPosition : POSITION,
+ out float4 worldPos : TEXCOORD0,
+
+ uniform float4x4 worldViewProj,
+ uniform float4x4 world
+) {
+ oPosition = mul(worldViewProj, position);
+ worldPos = mul(world, position);
+}
+
+// Entry point for GroundFog fragment program.
+void GroundFog_fp
+(
+ float3 worldPos : TEXCOORD0,
+
+ uniform float3 camPos,
+ uniform float4 fogColour,
+ uniform float fogDensity,
+ uniform float fogVerticalDecay,
+ uniform float fogGroundLevel,
+
+ out float4 oCol : COLOR
+) {
+ float h1 = camPos.y;
+ float h2 = worldPos.y;
+ float invSinView = length(camPos - worldPos) / (h2 - h1);
+ float fog = ExpGroundFog(invSinView,
+ h1, h2, fogDensity, fogVerticalDecay, fogGroundLevel);
+
+ oCol.rgb = fogColour.rgb;
+ oCol.a = fog;
+}
+
+// Entry point for GroundFogDome vertex program.
+void GroundFogDome_vp
+(
+ in float4 position : POSITION,
+ out float4 oPosition : POSITION,
+ out float3 relPosition : TEXCOORD0,
+ uniform float4x4 worldViewProj
+) {
+ oPosition = mul(worldViewProj, position);
+ relPosition = normalize(position);
+}
+
+// Entry point for the GroundFogDome fragment program.
+void GroundFogDome_fp
+(
+ in float3 relPosition : TEXCOORD0,
+
+ uniform float cameraHeight,
+ uniform float4 fogColour,
+ uniform float fogDensity,
+ uniform float fogVerticalDecay,
+ uniform float fogGroundLevel,
+
+ out float4 oCol : COLOR
+) {
+ // Fog magic.
+ float invSinView = 1 / (relPosition.y);
+ float h1 = cameraHeight;
+ float aFog;
+
+ if (invSinView < 0) {
+ // Gazing into the abyss
+ aFog = 0;
+ } else {
+ aFog = saturate (ExpGroundFogInf (
+ invSinView, h1, fogDensity, fogVerticalDecay, fogGroundLevel));
+ }
+
+ oCol.a = aFog;
+ oCol.rgb = fogColour.rgb;
+}
\ No newline at end of file
Added: trunk/python-ogre/demos/caelum/media/GroundFog.material
===================================================================
--- trunk/python-ogre/demos/caelum/media/GroundFog.material (rev 0)
+++ trunk/python-ogre/demos/caelum/media/GroundFog.material 2007-10-20 00:42:29 UTC (rev 446)
@@ -0,0 +1,49 @@
+// Sample base material for using CaelumGroundFog.
+material CaelumGroundFogBase
+{
+ technique Default
+ {
+ pass Main
+ {
+ fog_override true none
+ }
+
+ // Fog pass
+ pass CaelumGroundFog
+ {
+ vertex_program_ref CaelumGroundFogVP
+ {
+ }
+
+ fragment_program_ref CaelumGroundFogFP
+ {
+ }
+
+ scene_blend alpha_blend
+ }
+ }
+}
+
+material CaelumGroundFogDome
+{
+ technique
+ {
+ pass
+ {
+ lighting off
+ depth_check off
+ depth_write off
+ fog_override true
+ scene_blend alpha_blend
+ cull_hardware none
+
+ vertex_program_ref CaelumGroundFogDomeVP
+ {
+ }
+
+ fragment_program_ref CaelumGroundFogDomeFP
+ {
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/python-ogre/demos/caelum/media/GroundFog.program
===================================================================
--- trunk/python-ogre/demos/caelum/media/GroundFog.program (rev 0)
+++ trunk/python-ogre/demos/caelum/media/GroundFog.program 2007-10-20 00:42:29 UTC (rev 446)
@@ -0,0 +1,65 @@
+vertex_program CaelumGroundFogVP cg
+{
+ source CaelumShaders.cg
+ entry_point GroundFog_vp
+ profiles vs_2_x arbvp1 vp30
+ compile_arguments -posinv
+
+ default_params
+ {
+ param_named_auto worldViewProj worldviewproj_matrix
+ param_named_auto world world_matrix
+ }
+}
+
+fragment_program CaelumGroundFogFP cg
+{
+ source CaelumShaders.cg
+ entry_point GroundFog_fp
+ profiles ps_2_x arbfp1 fp30
+
+ default_params
+ {
+ param_named_auto camPos camera_position
+
+ // _auto seems wrong here, since the fog formulas are different than
+ // for standard exp fog.
+ param_named fogDensity float 0
+ param_named fogVerticalDecay float 0
+ param_named fogGroundLevel float 0
+ param_named fogColour float4 0 0 0 0
+ }
+}
+
+vertex_program CaelumGroundFogDomeVP cg
+{
+ source CaelumShaders.cg
+ entry_point GroundFogDome_vp
+ profiles vs_2_0 arbvp1
+ compile_arguments -posinv
+
+ default_params
+ {
+ param_named_auto worldViewProj worldviewproj_matrix
+ }
+}
+
+fragment_program CaelumGroundFogDomeFP cg
+{
+ source CaelumShaders.cg
+ entry_point GroundFogDome_fp
+ profiles ps_2_0 arbfp1
+
+ default_params
+ {
+ // Fog parameters.
+ param_named fogColour float4 0 0 0 0
+ param_named fogDensity float 0
+ param_named fogVerticalDecay float 0
+ param_named fogGroundLevel float 0
+
+ // Send camera height. We can't send camera_position because
+ // the entity is always moved with the camera. Joy.
+ param_named cameraHeight float 0
+ }
+}
\ No newline at end of file
Added: trunk/python-ogre/demos/caelum/media/Haze.program
===================================================================
--- trunk/python-ogre/demos/caelum/media/Haze.program (rev 0)
+++ trunk/python-ogre/demos/caelum/media/Haze.program 2007-10-20 00:42:29 UTC (rev 446)
@@ -0,0 +1,26 @@
+vertex_program CaelumHazeVP cg
+{
+ source CaelumShaders.cg
+ entry_point Haze_vp
+ profiles vs_2_0 arbvp1 vp30
+ compile_arguments -posinv
+
+ default_params
+ {
+ param_named_auto worldViewProj worldviewproj_matrix
+ param_named_auto camPos camera_position
+ }
+}
+
+fragment_program CaelumHazeFP cg
+{
+ source CaelumShaders.cg
+ entry_point Haze_fp
+ profiles ps_2_0 arbfp1 fp30
+ compile_arguments -posinv
+
+ default_params
+ {
+ param_named_auto fogColour fog_colour
+ }
+}
\ No newline at end of file
Modified: trunk/python-ogre/demos/caelum/media/LayeredClouds.material
===================================================================
--- trunk/python-ogre/demos/caelum/media/LayeredClouds.material 2007-10-19 13:17:02 UTC (rev 445)
+++ trunk/python-ogre/demos/caelum/media/LayeredClouds.material 2007-10-20 00:42:29 UTC (rev 446)
@@ -1,9 +1,10 @@
-vertex_program LayeredCloudVP cg
+vertex_program CaelumLayeredCloudsVP cg
{
- source LayeredCloud.cg
- entry_point main_vp
- profiles vs_2_0 arbvp1 vp30
-
+ source CaelumShaders.cg
+ entry_point LayeredClouds_vp
+ profiles vs_2_0 arbvp1
+ compile_arguments -posinv
+
default_params
{
param_named_auto worldViewProj worldviewproj_matrix
@@ -11,131 +12,80 @@
}
}
-fragment_program LayeredCloudFP cg
+fragment_program CaelumLayeredCloudsFP cg
{
- source LayeredCloud.cg
- entry_point main_fp
- profiles ps_2_0 arbfp1 fp30
+ source CaelumShaders.cg
+ entry_point LayeredClouds_fp
+ profiles ps_2_0 arbfp1
default_params
{
- param_named time float 0 // Time offset
- param_named_auto fogColour fog_colour
+ // Caelum sky properties
param_named sunDirection float3 -1 -1 0
param_named sunColour float4 1 1 1 1
- param_named lightInvScattering float 1 // The inverse of the light scattering: The higher, the less scatter (and glow)
- param_named absorptionFactor float 0.5 // How much light the cloud absorbs; [0, 1]
- param_named cloudInvScale float 1.5 // The inverse of the cloud forms scale
- param_named detailInvScale float 7 // The inverse of the cloud details scale
- param_named noiseInvScale float 31 // The inverse of the cloud noise scale
- param_named cloudSpeed float2 0 0 // The cloud speed
- param_named detailSpeed float2 0 0 // The cloud details speed
- param_named haloThreshold float 0 // The halo threshold. If the cloud glow is below this threshold, it's boosted suddenly, forming a halo.
+
+ // The inverse of the cloud forms scale
+ param_named cloudMassInvScale float 1.2
+ // The inverse of the cloud details scale
+ param_named cloudDetailInvScale float 4.8
+
+ // Cloud mass offset
+ param_named cloudMassOffset float2 0 0
+ // Cloud details offset
+ param_named cloudDetailOffset float2 0.5 0.5
+
+ // Cloud coverage, between 0 and 1
+ param_named cloudCover float 0.9
+ // Blending factor between Cloud1 and Cloud2
+ param_named cloudMassBlend float 0.9
+ // Cloud detail weight.
+ param_named cloudDetailBlend float 0.5
+
+ // Cloud sharpness. Lower values result in softer clouds.
+ param_named cloudSharpness float 4
+
+ // Cloud thickness. Bigger values results in darker clouds.
+ param_named cloudThickness float 3
+
+ // Fog colour; used as the base cloud colour.
+ param_named fogColour float4
}
}
-material LayeredCloud
+material CaelumLayeredClouds
{
technique
{
pass
{
lighting off
+ depth_check off
+ depth_write off
scene_blend alpha_blend
+ fog_override true
- vertex_program_ref LayeredCloudVP
+ vertex_program_ref CaelumLayeredCloudsVP
{
}
- fragment_program_ref LayeredCloudFP
+
+ fragment_program_ref CaelumLayeredCloudsFP
{
- param_named cloudSpeed float2 0.000025 0.00002
- param_named detailSpeed float2 -0.00001 -0.000015
}
- texture_unit Cloud
+ texture_unit Cloud1
{
- texture CloudLayer.png
+ anim_texture noise1.png noise2.png noise3.png noise4.png 600
}
- texture_unit Detail
+
+ texture_unit Cloud2
{
- texture AltocumulusDetail.png
+ anim_texture noise2.png noise3.png noise4.png noise1.png 600
}
- texture_unit Noise
+
+ texture_unit Detail
{
- texture CloudNoise1.png
+ texture noise4.png
}
}
}
-}
-
-material Altocumulus : LayeredCloud
-{
- set_texture_alias Detail AltocumulusDetail.png
- set_texture_alias Noise CloudNoise1.png
-
- technique
- {
- pass
- {
- fragment_program_ref LayeredCloudFP
- {
- param_named lightInvScattering float 3
- param_named absorptionFactor float 0.6
- }
- }
- }
-}
-
-material Altostratus : LayeredCloud
-{
- set_texture_alias Detail AltostratusDetail.png
- set_texture_alias Noise AltostratusDetail.png
-
- technique
- {
- pass
- {
- fragment_program_ref LayeredCloudFP
- {
- param_named absorptionFactor float 0.4
- param_named haloThreshold float 0.85
- }
- }
- }
-}
-
-material Cirrostratus : LayeredCloud
-{
- set_texture_alias Detail CirrostratusDetail.png
- set_texture_alias Noise AltostratusDetail.png
-
- technique
- {
- pass
- {
- fragment_program_ref LayeredCloudFP
- {
- param_named absorptionFactor float 0
- param_named haloThreshold float 0.85
- }
- }
- }
-}
-
-material Cirrus : LayeredCloud
-{
- set_texture_alias Detail CirrusDetail.png
- set_texture_alias Noise AltostratusDetail.png
-
- technique
- {
- pass
- {
- fragment_program_ref LayeredCloudFP
- {
- param_named absorptionFactor float 0
- param_named haloThreshold float 0.85
- }
- }
- }
-}
+}
\ No newline at end of file
Added: trunk/python-ogre/demos/caelum/media/SunGradient.png
===================================================================
(Binary files differ)
Property changes on: trunk/python-ogre/demos/caelum/media/SunGradient.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/python-ogre/demos/caelum/media/Terrain.material
===================================================================
--- trunk/python-ogre/demos/caelum/media/Terrain.material 2007-10-19 13:17:02 UTC (rev 445)
+++ trunk/python-ogre/demos/caelum/media/Terrain.material 2007-10-20 00:42:29 UTC (rev 446)
@@ -1,69 +1,78 @@
-vertex_program HazeVP cg
-{
- source CaelumShaders.cg
- entry_point Haze_vp
- profiles vs_2_0 arbvp1 vp30
-
- default_params
- {
- param_named_auto worldViewProj worldviewproj_matrix
- param_named_auto camPos camera_position
- }
-}
-
-fragment_program HazeFP cg
-{
- source CaelumShaders.cg
- entry_point Haze_fp
- profiles ps_2_0 arbfp1 fp30
-
- default_params
- {
- param_named_auto fogColour fog_colour
- }
-}
-
-material CaelumDemoTerrain
-{
- technique
- {
- pass
- {
- texture_unit
- {
- texture terrain_texture.jpg
- }
-
- texture_unit
- {
- texture terrain_detail.jpg
- scale 0.1 0.1
- }
- }
-
- // Haze pass
- pass Haze
- {
- vertex_program_ref HazeVP
- {
- }
- fragment_program_ref HazeFP
- {
- }
-
- lighting off
- scene_blend alpha_blend
-
- texture_unit
- {
- texture AtmosphereDepth.png
- tex_address_mode clamp clamp clamp
- }
- texture_unit
- {
- texture EarthClearSky2.png
- tex_address_mode wrap clamp clamp
- }
- }
- }
-}
+// Base class for materials in the caelum demo.
+// They have a main pass and additional fog passes.
+// Perhaps might be better to do this at runtime somehow?
+material CaelumDemoBase
+{
+ technique
+ {
+ pass Main
+ {
+ fog_override true none
+ }
+
+ // Haze pass
+ pass CaelumHaze
+ {
+ vertex_program_ref CaelumHazeVP
+ {
+ }
+ fragment_program_ref CaelumHazeFP
+ {
+ }
+
+ lighting off
+ scene_blend alpha_blend
+ fog_override false
+
+ texture_unit
+ {
+ texture AtmosphereDepth.png 1D
+ tex_address_mode clamp clamp clamp
+ }
+ texture_unit
+ {
+ texture EarthClearSky2.png
+ tex_address_mode wrap clamp clamp
+ }
+ }
+
+ // Ground fog pass.
+ pass CaelumGroundFog
+ {
+ vertex_program_ref CaelumGroundFogVP
+ {
+ }
+
+ fragment_program_ref CaelumGroundFogFP
+ {
+ }
+
+ lighting off
+ //depth_write off
+ //colour_write off
+ scene_blend alpha_blend
+ }
+ }
+}
+
+// Demo terrain material.
+material CaelumDemoTerrain: CaelumDemoBase
+{
+ technique
+ {
+ // Main terrain pass.
+ pass Main
+ {
+ texture_unit
+ {
+ texture terrain_texture.jpg
+ }
+
+ texture_unit
+ {
+ texture terrain_detail.jpg
+ scale 0.1 0.1
+ }
+ }
+ }
+}
Modified: trunk/python-ogre/setup.py
===================================================================
--- trunk/python-ogre/setup.py 2007-10-19 13:17:02 UTC (rev 445)
+++ trunk/python-ogre/setup.py 2007-10-20 00:42:29 UTC (rev 446)
@@ -33,7 +33,7 @@
METADATA = {
"name": "Python-Ogre",
- "version": "1.0 RC2d",
+ "version": "1.1.a",
"license": "LGPL",
"url": "http://python-ogre.python-hosting.com/",
"author": "Lakin Wecker, Roman Yakovenko, Andy",
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|