Dear shader experts,

Can I have a single-channel lightmap, and still use a vec3d in my model.xml to 
end up with green or red (or whatever) light rendered? As in (roughly)

on_screen_color[0] = lightmap-grey-value * vec3d[0] * texture[0]
on_screen_color[1] = lightmap-grey-value * vec3d[1] * texture[1]
on_screen_color[2] = lightmap-grey-value * vec3d[2] * texture[2]

where texture is the base model texture?

Docs/README.model-combined.eff says 

> <lightmap-color type="vec3d" n="0"> 1.0 1.0 1.0 </lightmap-color>
> - the color of the light for the red channel in the light-map.

etc for green and blue channels, but when I use this line, FG complains 

Failed to load xml: Unrecognized data type 'vec3d'
Failed to load model: Unrecognized data type 'vec3d'

I guess this works only for multi-channel lightmaps? I.e. with

<lightmap-multi type="int">1</lightmap-multi>

My .xml looks like this:

<effect>
  <inherits-from>Effects/model-combined-deferred</inherits-from>
  <parameters>
    <lightmap-enabled type="int">1</lightmap-enabled>
    <texture n="3">
      <image>tex/DSCF9503_noroofsec_pow2_LM.png</image>
      <wrap-s>repeat</wrap-s>
      <wrap-t>repeat</wrap-t>
    </texture>
<!--    <lightmap-color type="vec3d" n="0"> 1.0 5.0 0.2 </lightmap-color> -->
    <lightmap-factor type="float" n="0">1.0</lightmap-factor>
  </parameters>
  <object-name>b606</object-name>
  <object-name>b610</object-name>
</effect>

Tom A. (aka radi)

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to