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 - ETM

Pages: [1]
1
Other Packages / Re: Tasharen Fog of War
« on: March 26, 2015, 04:22:20 AM »
Understood. Would you consider lowering the price for this pack, because there are at least two assets with FOW and minimap support for about half the price?

Just curious.

2
Other Packages / Re: Tasharen Fog of War
« on: March 25, 2015, 05:30:45 AM »
Much obliged. It works, but I am stuck again. I am trying to get the output shader into ugui. I tried using the minimap fow material for the raw image, putting a camera above the quad to film it and then rendering a texture, but without any success. The raw image component paints a transparent image, when I click on the material, it looks fine in the inspector.

3
Other Packages / Re: Tasharen Fog of War
« on: March 24, 2015, 01:21:00 PM »
How do you setup the shader below then? I cannot get it to work. I've added
  1. public Material GetMaterial()
  2.         {
  3.                 return mMat;
  4.         }

to FOWImageEffect.cs and trying to get the textures like this
  1. public FOWImageEffect _imageEffect;
  2.         public Material _fowMaterial;
  3.  
  4.  
  5.         IEnumerator Start ()
  6.         {
  7.                 while (_imageEffect.GetMaterial() == null)
  8.                 {
  9.                         yield return new WaitForSeconds(1f);
  10.                 }
  11.  
  12.                 Material fowMat = _imageEffect.GetMaterial();
  13.                 _fowMaterial.SetTexture("_FogTex0", fowMat.GetTexture("_FogTex0"));
  14.                 _fowMaterial.SetTexture("_FogTex1", fowMat.GetTexture("_FogTex1"));
  15.         }

Not sure what the MainTex and Gradient parameters are and how to find them in the FOWImageEffect material. Notice: _fowMaterial refers to the material posted above. FogTex0 and FogTex1 are retrieved as expected, the texture shown by the RawImage component is white. Not sure where I would put "terrainOffset" and "terrainScale".


4
Other Packages / Re: Tasharen Fog of War
« on: March 23, 2015, 11:32:34 AM »
That really looks like a backward solution to my problem. What's the point of having a fog of war that cannot be used for minimaps easily. The custom shader solution worked great without any problems before 5.0, but is unusable now while the image effect solution has obvious drawbacks. Do you plan to update the terrain shader or should I just ask the Unity for a refund? This whole problem set my release date back for several weeks now.

5
Other Packages / Re: Tasharen Fog of War
« on: March 23, 2015, 09:27:02 AM »
I am confused, could you please provide a short step by step tutorial on how to get an rts-like fow working with ugui?
What I did is:
1. Set depth of orthographic camera (minimap) to 1, change to render texture, assign the render texture to a raw image component.
2. Set depth of perspective camera (main camera) to 0, added fowimageeffect to it.
3. Saw the main camera having fog of war, the minimap not so much.

How do you specify the order of drawing if not by setting depth?

6
Other Packages / Re: Tasharen Fog of War
« on: March 20, 2015, 09:00:41 AM »
FOW Image Effect needs to be on the camera that doesn't render to texture. Your camera that renders to texture should be drawn first, followed by your main camera (that should also have FOWImageEffect on it).

That doesn't help because there is no fog of war on the render texture.

7
Other Packages / Re: Tasharen Fog of War
« on: March 12, 2015, 05:16:32 AM »
I am having a hard time getting FOW to work in Unity 5.0. It is working correctly with a single camera using image effects, but when I use it with two cameras, the second one rendering to a rendertexture, the fog of war doesn't seem right. Random places appear dark and other visible. Before Unity 5.0 I used the custom shader solution, which worked great, but now I cannot use it anymore due to a shader issue which turns the material pink.

The shader throws the following error:
Too many texture interpolators would be used for ForwardBase pass (12 out of max 10)
 at line 28.


Pages: [1]