/// 引数付コンストラクタ public BasicShaderName( int MTXPLT_COUNT, bool ENABLE_VERTEX_COLOR, int TEX_COUNT, bool ENABLE_TEXANIM, int LIGHT_COUNT, LightingType LIGHTING_TYPE, NormalMapType NORMALMAP_TYPE, int[] TEXCOORD, TexType[] TEXTYPE, TexBlendFunc[] BLENDFUNC, bool ENABLE_ALPHA_THRESHHOLD ) { this.Set(MTXPLT_COUNT, ENABLE_VERTEX_COLOR, TEX_COUNT, ENABLE_TEXANIM, LIGHT_COUNT, LIGHTING_TYPE, NORMALMAP_TYPE, TEXCOORD, TEXTYPE, BLENDFUNC, ENABLE_ALPHA_THRESHHOLD); }
public EvolvedShape(Game game, EvolvedShapes shape, int shapeNumber, LightingType scene) : base(game) { this.shape = shape; this.shapeNumber = shapeNumber; this.scene = (int)scene; CreateShape(); }
public J3DRenderable(J3D model_ref, J3DRenderable parent, LightingType light_type = LightingType.Actor, string socket = "") { Children = new List <J3DRenderable>(); m_Parent = parent; m_Model = model_ref; m_LightType = light_type; m_SocketName = socket; }
protected LightingType CurrentLightingType(Material _targetMat) { LightingType projection = LightingType.Custom; if (_targetMat.IsKeywordEnabled("_LIGHTING_UNITY")) { projection = LightingType.Unity; } else if (_targetMat.IsKeywordEnabled("_LIGHTING_CENTRAL")) { projection = LightingType.Central; } return(projection); }
public GlobalResourceSetIndices( uint?globalConstants, LightingType lightingType, uint?globalLightingConstants, uint?cloudConstants, uint?shadowConstants, uint?renderItemConstants) { GlobalConstants = globalConstants; LightingType = lightingType; GlobalLightingConstants = globalLightingConstants; CloudConstants = cloudConstants; ShadowConstants = shadowConstants; RenderItemConstants = renderItemConstants; }
/// キーとして利用する LightType に符号化する string toLightTypeCode(LightingType flg) { if (flg == LightingType.kLIGHTING_NONE) { return("N"); } else if (flg == LightingType.kLIGHTING_VERTEX) { return("V"); } else if (flg == LightingType.kLIGHTING_FLAGMENT) { return("F"); } return("N"); }
public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext) { base.CopyFrom(from, cloneContext); DxfViewport dxfViewport = (DxfViewport)from; this.point3D_0 = dxfViewport.point3D_0; this.size2D_0 = dxfViewport.size2D_0; this.point2D_0 = dxfViewport.point2D_0; this.point2D_1 = dxfViewport.point2D_1; this.vector2D_0 = dxfViewport.vector2D_0; this.vector2D_1 = dxfViewport.vector2D_1; this.vector3D_0 = dxfViewport.vector3D_0; this.point3D_1 = dxfViewport.point3D_1; this.double_1 = dxfViewport.double_1; this.double_2 = dxfViewport.double_2; this.double_3 = dxfViewport.double_3; this.double_4 = dxfViewport.double_4; this.double_5 = dxfViewport.double_5; this.double_6 = dxfViewport.double_6; this.double_7 = dxfViewport.double_7; foreach (DxfLayer from1 in dxfViewport.dxfHandledObjectCollection_1) { DxfLayer layer = Class906.GetLayer(cloneContext, from1); if (!this.dxfHandledObjectCollection_1.Contains(layer)) { this.dxfHandledObjectCollection_1.Add(layer); } } this.StatusFlags = dxfViewport.viewportStatusFlags_0; this.dxfObjectReference_6 = DxfObjectReference.Null; this.string_1 = dxfViewport.string_1; this.renderMode_0 = dxfViewport.renderMode_0; this.bool_2 = dxfViewport.bool_2; this.bool_3 = dxfViewport.bool_3; this.dxfUcs_0 = Class906.smethod_2(cloneContext, dxfViewport.dxfUcs_0); this.orthographicType_0 = dxfViewport.orthographicType_0; this.shadePlotMode_0 = dxfViewport.shadePlotMode_0; this.short_1 = dxfViewport.short_1; this.bool_4 = dxfViewport.bool_4; this.lightingType_0 = dxfViewport.lightingType_0; this.double_8 = dxfViewport.double_8; this.double_9 = dxfViewport.double_9; this.color_0 = dxfViewport.color_0; this.ViewportEntityHeader = dxfViewport.dxfViewportEntityHeader_0 != null ? (DxfViewportEntityHeader)dxfViewport.dxfViewportEntityHeader_0.Clone(cloneContext) : (DxfViewportEntityHeader)null; this.method_23(); }
public void LoadPreferences() { Directory.SetCurrentDirectory(m_filepath_root); //m_filepath_root = UserPrefs.GetString("filepath_root", m_filepath_root); m_filepath_decal_textures = UserPrefs.GetString("filepath_decal_textures", m_filepath_decal_textures); m_filepath_level_textures = UserPrefs.GetString("filepath_level_textures", m_filepath_level_textures); m_filepath_decals = UserPrefs.GetString("filepath_decals", m_filepath_decals); m_grid_display = (GridDisplay)UserPrefs.GetInt("grid_display", (int)m_grid_display); m_grid_spacing = UserPrefs.GetFloat("grid_spacing", m_grid_spacing); SetGridLines(); m_grid_snap = UserPrefs.GetFloat("grid_snap", m_grid_snap); m_extrude_length = UserPrefs.GetFloat("extrude_length", m_extrude_length); m_inset_pct = UserPrefs.GetInt("inset_pct", m_inset_pct); m_inset_length = UserPrefs.GetFloat("inset_length", m_inset_length); m_bevel_width = UserPrefs.GetFloat("bevel_width", m_bevel_width); m_coplanar_tol = UserPrefs.GetInt("coplanar_tol", m_coplanar_tol); m_side_select = (SideSelect)UserPrefs.GetInt("side_select", (int)m_side_select); m_drag_mode = (DragMode)UserPrefs.GetInt("drag_mode", (int)m_drag_mode); m_view_mode_ortho = (ViewMode)UserPrefs.GetInt("view_mode_ortho", (int)m_view_mode_ortho); m_view_mode_persp = (ViewMode)UserPrefs.GetInt("view_mode_persp", (int)m_view_mode_persp); m_view_persp_fov = UserPrefs.GetInt("view_persp_fov", m_view_persp_fov); m_view_layout = (ViewLayout)UserPrefs.GetInt("view_layout", (int)m_view_layout); m_bg_color = (BGColor)UserPrefs.GetInt("bg_color", (int)m_bg_color); m_gimbal_display = (GimbalDisplay)UserPrefs.GetInt("gimbal_display", (int)m_gimbal_display); m_lighting_type = (LightingType)UserPrefs.GetInt("lighting_type", (int)m_lighting_type); m_pivot_mode = (PivotMode)UserPrefs.GetInt("pivot_mode", (int)m_pivot_mode); m_low_res_force = UserPrefs.GetBool("low_res_force", m_low_res_force); forceLowResTexturesToolStripMenuItem.Checked = m_low_res_force; m_tex_list_loc = UserPrefs.GetPoint("tex_list_loc", texture_list.Location); m_tex_list_sz = UserPrefs.GetPoint("tex_list_sz", (Point)texture_list.Size); m_tunnel_builder_loc = UserPrefs.GetPoint("tunnel_builder_loc", tunnel_builder.Location); texture_list.Size = (Size)m_tex_list_sz; for (int i = 0; i < RECENT_NUM; i++) { m_recent_files[i] = UserPrefs.GetString("recent" + i.ToString(), m_recent_files[i]); } UpdateRecentFileMenu(); }
public void Set( int MTXPLT_COUNT, bool ENABLE_VERTEX_COLOR, int TEX_COUNT, bool ENABLE_TEXANIM, int LIGHT_COUNT, LightingType LIGHTING_TYPE, NormalMapType NORMALMAP_TYPE, int[] TEXCOORD, TexType[] TEXTYPE, TexBlendFunc[] BLENDFUNC, bool ENABLE_ALPHA_THRESHHOLD ) { this.MTXPLT_COUNT = MTXPLT_COUNT; this.ENABLE_VERTEX_COLOR = ENABLE_VERTEX_COLOR; this.TEX_COUNT = TEX_COUNT; this.ENABLE_TEXANIM = ENABLE_TEXANIM; this.LIGHT_COUNT = LIGHT_COUNT; this.LIGHTING_TYPE = LIGHTING_TYPE; if (this.LIGHT_COUNT <= 0) { this.LIGHTING_TYPE = LightingType.kLIGHTING_NONE; } this.NORMALMAP_TYPE = NORMALMAP_TYPE; for (int i = 0; i < this.TEXCOORD.Length; i++) { if (i < TEX_COUNT) { this.TEXCOORD[i] = TEXCOORD[i]; this.TEXTYPE[i] = TEXTYPE[i]; this.BLENDFUNC[i] = BLENDFUNC[i]; } else { this.TEXCOORD[i] = 0; this.TEXTYPE[i] = TexType.kTEXTYPE_NONE; this.BLENDFUNC[i] = TexBlendFunc.kBLEND_NONE; } } this.ENABLE_ALPHA_THRESHHOLD = ENABLE_ALPHA_THRESHHOLD; makeNames(); }
//Get the approach light data. public SvgData[] GetApproachLightData(LightingType lightingType) { switch (lightingType) { case LightingType.ALSF1: return(ALSF1); case LightingType.ALSF2: return(ALSF2); case LightingType.CALVERT1: return(CALVERT1); case LightingType.CALVERT2: return(CALVERT2); case LightingType.MALS: return(MALS); case LightingType.SALS: return(SALS); case LightingType.SSALS: return(SSALS); case LightingType.MALSF: return(MALSF); case LightingType.MALSR: return(MALSR); case LightingType.SSALF: return(SSALF); case LightingType.SSALR: return(SSALR); case LightingType.TDZ: return(TDZ); } return(null); }
void DoToon() { LightingType lightType = LightingType.PBR; bool rampTexColor = false; //if (IsKeywordEnabled("_LIGHT_PBR")) //{ // lightType = LightingType.PBR; //} if (IsKeywordEnabled("_LIGHT_TOON")) { lightType = LightingType.Toon; } //MaterialProperty slider = FindProperty("_Smoothness"); EditorGUI.indentLevel += 2; //editor.ShaderProperty(slider, MakeLabel(slider)); EditorGUI.indentLevel += 1; EditorGUI.BeginChangeCheck(); lightType = (LightingType)EditorGUILayout.EnumPopup( MakeLabel("Lighting Type"), lightType); if (IsKeywordEnabled("_LIGHT_TOON")) { MaterialProperty rampTex = FindProperty("_Ramp"); editor.TexturePropertySingleLine( MakeLabel(rampTex, "Ramp Texture"), rampTex); rampTexColor = EditorGUILayout.Toggle( MakeLabel("Colored Toon Ramp", "Colored Toon Ramp"), IsKeywordEnabled("_TOON_COLOR")); } if (EditorGUI.EndChangeCheck()) { RecordAction("Lighting Type"); SetKeyword("_TOON_COLOR", rampTexColor); SetKeyword("_LIGHT_TOON", lightType == LightingType.Toon); } EditorGUI.indentLevel -= 3; }
protected virtual void DoSettingsArea(Material _targetMat, MaterialEditor _editor, MaterialProperty[] _properties) { GUILayout.Label("Settings", EditorStyles.boldLabel); CameraProjection projection = CurrentProjection(_targetMat); EditorGUI.BeginChangeCheck(); projection = (CameraProjection)EditorGUILayout.EnumPopup(new GUIContent("Projection", "_Camera"), projection); if (EditorGUI.EndChangeCheck()) { _editor.RegisterPropertyChangeUndo("Projection"); SetKeyword(_targetMat, "_CAMERA_PERSPECTIVE", projection == CameraProjection.Perspective); SetKeyword(_targetMat, "_CAMERA_ORTHOGRAPHIC", projection == CameraProjection.Orthographic); } LightingType lightingType = CurrentLightingType(_targetMat); EditorGUI.BeginChangeCheck(); lightingType = (LightingType)EditorGUILayout.EnumPopup(new GUIContent("Lighting", "_Lighting"), lightingType); if (EditorGUI.EndChangeCheck()) { _editor.RegisterPropertyChangeUndo("Lighting"); SetKeyword(_targetMat, "_LIGHTING_UNITY", lightingType == LightingType.Unity); SetKeyword(_targetMat, "_LIGHTING_CENTRAL", lightingType == LightingType.Central); SetKeyword(_targetMat, "_LIGHTING_CUSTOM", lightingType == LightingType.Custom); } if (lightingType == LightingType.Custom) { EditorGUI.indentLevel++; ShowShaderProperty(_editor, _properties, "Light Direction", "_LightDirection", ""); EditorGUI.indentLevel--; } bool toggle; ShowToggle(_targetMat, _editor, out toggle, "Poly Liquid", "_POLYLIQUID_ON", ""); }
public void SetLighting(LightingType value) { Lighting = value; }
public BasicShaderName(int worldCount, int lightCount, BasicMaterial material) { BasicLayer[] layers = material.Layers; int texCount = (layers.Length <= 3) ? layers.Length : 3; // bool texAnim = material.UseTexAnim; bool a_useTexAnim = false; // basic int a_lightCount = 0; LightingType a_lightType = LightingType.kLIGHTING_NONE; NormalMapType a_normalMapType = NormalMapType.kNORMALMAP_NONE; if (material.LightEnable != 0) { a_lightCount = lightCount; a_lightType = LightingType.kLIGHTING_FLAGMENT; a_normalMapType = NormalMapType.kNORMALMAP_NONE; } int[] texCoords = { 0, 0, 0 }; TexType[] texTypes = { 0, 0, 0 }; TexBlendFunc[] texBlendFuncs = { 0, 0, 0 }; int layerCount = (layers.Length <= 3) ? layers.Length : 3; for (int i = 0; i < layerCount; i++) { BasicLayer layer = layers[i]; // ここが無駄 if ((TexType)layer.TexType != TexType.kTEXTYPE_NONE) { if ((TexType)layer.TexType == TexType.kTEXTYPE_VERTEXNORMAL) { a_normalMapType = NormalMapType.kNORMALMAP_VERTEX; } else if ((TexType)layer.TexType == TexType.kTEXTYPE_IMAGENORMALL) { a_normalMapType = NormalMapType.kNORMALMAP_IMAGE; } } texCoords[i] = layer.TexCoord; texTypes[i] = (TexType)layer.TexType; texBlendFuncs[i] = (TexBlendFunc)layer.TexBlendFunc; if (layer.TexAnimBoneIdx >= 0) { a_useTexAnim = true; } } this.Set( worldCount, material.VertexColorEnable != 0, texCount, a_useTexAnim, a_lightCount, a_lightType, a_normalMapType, texCoords, texTypes, texBlendFuncs, material.AlphaThreshold > 0.0f ); }
public static void SetLightingMode(LightingType type) { setLightingMode(type); }
public void Set( int MTXPLT_COUNT, bool ENABLE_VERTEX_COLOR, int TEX_COUNT, bool ENABLE_TEXANIM, int LIGHT_COUNT, LightingType LIGHTING_TYPE, NormalMapType NORMALMAP_TYPE, int[] TEXCOORD, TexType[] TEXTYPE, TexBlendFunc[] BLENDFUNC, bool ENABLE_ALPHA_THRESHHOLD ) { this.MTXPLT_COUNT = MTXPLT_COUNT; this.ENABLE_VERTEX_COLOR = ENABLE_VERTEX_COLOR; this.TEX_COUNT = TEX_COUNT; this.ENABLE_TEXANIM = ENABLE_TEXANIM; this.LIGHT_COUNT = LIGHT_COUNT; this.LIGHTING_TYPE = LIGHTING_TYPE; if( this.LIGHT_COUNT <= 0 ){ this.LIGHTING_TYPE = LightingType.kLIGHTING_NONE; } this.NORMALMAP_TYPE = NORMALMAP_TYPE; for( int i = 0; i < this.TEXCOORD.Length; i++ ){ if( i < TEX_COUNT ){ this.TEXCOORD[i] = TEXCOORD[i]; this.TEXTYPE[i] = TEXTYPE[i]; this.BLENDFUNC[i] = BLENDFUNC[i]; }else{ this.TEXCOORD[i] = 0; this.TEXTYPE[i] = TexType.kTEXTYPE_NONE; this.BLENDFUNC[i] = TexBlendFunc.kBLEND_NONE; } } this.ENABLE_ALPHA_THRESHHOLD = ENABLE_ALPHA_THRESHHOLD; makeNames(); }
/// キーとして利用する LightType に符号化する string toLightTypeCode( LightingType flg ) { if( flg == LightingType.kLIGHTING_NONE ){ return "N"; }else if( flg == LightingType.kLIGHTING_VERTEX ){ return "V"; }else if( flg == LightingType.kLIGHTING_FLAGMENT ){ return "F"; } return "N"; }
public void LoadPreferences() { Directory.SetCurrentDirectory(m_filepath_root); m_grid_display = (GridDisplay)UserPrefs.GetInt("grid_display", (int)m_grid_display); m_grid_spacing = UserPrefs.GetInt("grid_spacing", m_grid_spacing); m_grid_snap = UserPrefs.GetFloat("grid_snap", m_grid_snap); m_coplanar_tol = UserPrefs.GetInt("coplanar_tol", m_coplanar_tol); m_rotate_angle = UserPrefs.GetInt("rotate_angle", m_rotate_angle); m_side_select = (SideSelect)UserPrefs.GetInt("side_select", (int)m_side_select); m_insert_advance = UserPrefs.GetBool("insert_advance", m_insert_advance); m_drag_mode = (DragMode)UserPrefs.GetInt("drag_mode", (int)m_drag_mode); m_view_mode_ortho = (ViewMode)UserPrefs.GetInt("view_mode_ortho", (int)m_view_mode_ortho); m_view_mode_persp = (ViewMode)UserPrefs.GetInt("view_mode_persp", (int)m_view_mode_persp); m_view_persp_fov = UserPrefs.GetInt("view_persp_fov", m_view_persp_fov); m_view_layout = (ViewLayout)UserPrefs.GetInt("view_layout", (int)m_view_layout); m_bg_color = (BGColor)UserPrefs.GetInt("bg_color", (int)m_bg_color); m_gimbal_display = (GimbalDisplay)UserPrefs.GetInt("gimbal_display", (int)m_gimbal_display); m_lighting_type = (LightingType)UserPrefs.GetInt("lighting_type", (int)m_lighting_type); m_cp_display = (ClipPlaneDisplay)UserPrefs.GetInt("clip_decal", (int)m_cp_display); m_insert_decal = (InsertDecal)UserPrefs.GetInt("insert_decal", (int)m_insert_decal); m_show_3d_text_type = (ShowTextType)UserPrefs.GetInt("show_segment_numbers", (int)m_show_3d_text_type); m_auto_center = UserPrefs.GetBool("auto_center", m_auto_center); m_decal_list_loc = UserPrefs.GetPoint("decal_list_loc", decal_list.Location); m_decal_list_sz = UserPrefs.GetPoint("decal_list_sz", (Point)decal_list.Size); m_tex_list_loc = UserPrefs.GetPoint("tex_list_loc", texture_list.Location); m_tex_list_sz = UserPrefs.GetPoint("tex_list_sz", (Point)texture_list.Size); m_texture_set_list_loc = UserPrefs.GetPoint("texture_set_list_loc", texture_list.Location); m_texture_set_list_sz = UserPrefs.GetPoint("texture_set_list_sz", (Point)texture_list.Size); m_uv_editor_loc = UserPrefs.GetPoint("uv_editor_loc", uv_editor.Location); m_uv_editor_sz = UserPrefs.GetPoint("uv_editor_sz", (Point)uv_editor.Size); decal_list.Size = (Size)m_decal_list_sz; texture_list.Size = (Size)m_tex_list_sz; uv_editor.Size = (Size)m_uv_editor_sz; for (int i = 0; i < NumRecentFiles; i++) { string recent_file = GetRecentFile(i); SetRecentFile(i, UserPrefs.GetString("recent" + i.ToString(), recent_file)); } Shell.UpdateRecentFileMenu(); m_pivot_mode = (PivotMode)UserPrefs.GetInt("entity_pivot", (int)m_pivot_mode); m_editor_layout = UserPrefs.GetString("layout", string.Empty); //Save whether pop-up windows are open at startup m_decal_list_visible = UserPrefs.GetBool("decal_list_vis", false); m_texture_list_visible = UserPrefs.GetBool("tex_list_vis", false); m_texture_set_list_visible = UserPrefs.GetBool("texture_set_list_vis", false); m_uv_editor_visible = UserPrefs.GetBool("uv_editor_vis", false); #if !PUBLIC_RELEASE Overload.Perforce.m_cached_username = UserPrefs.GetString("m_cached_username", string.Empty); Overload.Perforce.m_cached_clientname = UserPrefs.GetString("m_cached_clientname", string.Empty); #endif // !PUBLIC_RELEASE m_mm_edit_type = (EditMode)UserPrefs.GetInt("mm_edit_type", (int)m_mm_edit_type); m_mm_op_mode = (OperationMode)UserPrefs.GetInt("mm_op_mode", (int)m_mm_op_mode); //Read texture collections int num_texture_collections = UserPrefs.GetInt("num_texture_collections", 0); for (int c = 0; c < num_texture_collections; c++) { TextureCollections.Add(new TextureCollection(UserPrefs.GetString("texture_collection_" + c), true)); } }
//Get the approach light data. public SvgData[] GetApproachLightData(LightingType lightingType){ switch(lightingType){ case LightingType.ALSF1: return ALSF1; case LightingType.ALSF2: return ALSF2; case LightingType.CALVERT1: return CALVERT1; case LightingType.CALVERT2: return CALVERT2; case LightingType.MALS: return MALS; case LightingType.SALS: return SALS; case LightingType.SSALS: return SSALS; case LightingType.MALSF: return MALSF; case LightingType.MALSR: return MALSR; case LightingType.SSALF: return SSALF; case LightingType.SSALR: return SSALR; case LightingType.TDZ: return TDZ; } return null; }
static extern void setLightingMode(LightingType type);
public void CycleLightingType() { m_lighting_type = (LightingType)(((int)m_lighting_type + 1) % (int)LightingType.NUM); UpdateOptionLabels(); RefreshGeometry(); }
/// 引数付コンストラクタ public BasicShaderName( int MTXPLT_COUNT, bool ENABLE_VERTEX_COLOR, int TEX_COUNT, bool ENABLE_TEXANIM, int LIGHT_COUNT, LightingType LIGHTING_TYPE, NormalMapType NORMALMAP_TYPE, int[] TEXCOORD, TexType[] TEXTYPE, TexBlendFunc[] BLENDFUNC, bool ENABLE_ALPHA_THRESHHOLD ) { this.Set( MTXPLT_COUNT, ENABLE_VERTEX_COLOR, TEX_COUNT, ENABLE_TEXANIM, LIGHT_COUNT, LIGHTING_TYPE, NORMALMAP_TYPE, TEXCOORD, TEXTYPE, BLENDFUNC, ENABLE_ALPHA_THRESHHOLD ); }
public EvolvedShape(Game game, EvolvedShapes shape, PlayerIndex player, int shapeNumber, LightingType scene) : base(game) { Debug.Assert(shape == EvolvedShapes.Weapon, "Constructor should only be called with Weapon"); this.player = player; this.shape = shape; this.shapeNumber = shapeNumber; this.scene = (int)scene; CreateShape(); }
extern static void setLightingMode(LightingType type);
public BasicEffectShape(Game game, BasicEffectShapes shape, PlayerIndex player, int shipNumber, int skinNumber, LightingType scene) : base(game) { Debug.Assert(shape == BasicEffectShapes.Ship, "Constructor should only be called with Ship"); this.shape = shape; this.shapeNumber = shipNumber; this.skinNumber = skinNumber; this.player = player; this.scene = (int)scene; CreateShip(); }