﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AKupoman%2FCustom_Shader</id>
	<title>利用者:Kupoman/Custom Shader - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AKupoman%2FCustom_Shader"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Kupoman/Custom_Shader&amp;action=history"/>
	<updated>2026-09-10T13:33:05Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Kupoman/Custom_Shader&amp;diff=146405&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Kupoman/Custom_Shader&amp;diff=146405&amp;oldid=prev"/>
		<updated>2018-06-28T21:07:37Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 21:07時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Kupoman/Custom_Shader&amp;diff=146404&amp;oldid=prev</id>
		<title>wiki&gt;Kupoman: /* Lights */</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Kupoman/Custom_Shader&amp;diff=146404&amp;oldid=prev"/>
		<updated>2014-03-31T00:42:42Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Lights&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Introduction =&lt;br /&gt;
Some users desire more control over materials than what the built in material settings provide. Those users often resort to writing their own GLSL shaders to gain greater control. This system offers an API to assist in authoring shaders, as well as an artist friendly user interface to make use of shaders.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
[[File:Kupoman-custom-shader-ui.png|right]]&lt;br /&gt;
Custom shader settings can be found in the Material settings when the renderer is set to Blender Game. The Custom Shader panel allows the user to select what shaders to use for this material, as well as loading the source code for those shaders. Shader source code can come from either an internal location (Text data blocks) or an external location (file path).&lt;br /&gt;
&lt;br /&gt;
When a shader is loaded, the Custom Shader Settings panel appears with options specific to the loaded shader.&lt;br /&gt;
&lt;br /&gt;
= API =&lt;br /&gt;
== Uniforms ==&lt;br /&gt;
Any uniforms declared in a shader are added to the user interface when a shader is loaded&lt;br /&gt;
&lt;br /&gt;
== Lights ==&lt;br /&gt;
Lighting data can be accessed in a shader by first including the light code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;glsl&amp;quot;&amp;gt;&lt;br /&gt;
#pragma bgl include lights&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line gets replaced by the following glsl code before the shader is compiled:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;glsl&amp;quot;&amp;gt;&lt;br /&gt;
#ifndef MAX_LIGHTS&lt;br /&gt;
#define MAX_LIGHTS 4&lt;br /&gt;
#endif&lt;br /&gt;
struct Light {&lt;br /&gt;
	float dist;&lt;br /&gt;
	vec3 color;&lt;br /&gt;
	vec3 position;&lt;br /&gt;
};&lt;br /&gt;
uniform int bgl_lightcount;&lt;br /&gt;
uniform Light bgl_lights[MAX_LIGHTS];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>wiki&gt;Kupoman</name></author>
		
	</entry>
</feed>