1 (edited by ppizarro 2018-04-26 18:15:18)

Topic: Asking for shadows on OnlineMaps generated mesh.

Hi! I am a Programmer of a game developer team.

I would like to know how to project shadows on the plane or terrain generated by the online maps service. I'm instantiating Game Objects but they do not produce shadow. And looking at the shaders, I realized that if I eliminate that indicated code ("Queue"="Transparent-100" ) it starts to show shadow but I lose the quality of the tiles. Some help? sorry for the google translation  smile

Shader "Infinity Code/Online Maps/Tileset DrawingElement" {
Properties {
    _Color ("Main Color", Color) = (1,1,1,1)
    _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}

SubShader {
    Tags {"Queue"="Transparent-100" "IgnoreProjector"="True" "RenderType"="Transparent"}
    LOD 200

CGPROGRAM
#pragma surface surf Lambert alpha

sampler2D _MainTex;
fixed4 _Color;

struct Input {
    float2 uv_MainTex;
    float2 uv_TrafficTex;
};

void surf (Input IN, inout SurfaceOutput o) {
    fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
    fixed3 ct = c.rgb;
    ct = ct * _Color;
    o.Albedo = ct;
    o.Alpha = c.a * _Color.a;
}
ENDCG
}

[attached image]

Post's attachments

Attachment icon shader.png 32.16 kb, 77 downloads since 2018-04-26 

Re: Asking for shadows on OnlineMaps generated mesh.

Hello.

Online Maps Tileset Control / Materials & Shaders / Tileset Shader - Tileset Cutout Shader

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Asking for shadows on OnlineMaps generated mesh.

Thanks for the quick reply, but we don't know almost anything about shaders. Can you please explain us what to modify in those two shaders you mention? So we don't have to study how they work. We just want the map to receive shadows from 3D objects

Re: Asking for shadows on OnlineMaps generated mesh.

You do not need to modify anything.
Simple set the value that I wrote in my previous post.

P.S. Tileset DrawingElement shader it's for drawing elements (line, poly, rectangle), and not for main map mesh.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.