Skip to Content

February 2015 - benchung.com

Basic GLSL Displacement Shader in Three.js

|Three.js|2 Comments

This tutorial introduces construction a basic GLSL Displacement Shader in Three.js. It can really apply to any GLSL program, but we'll take advantage of the three.js ability of using custom shaders. If you're very new to Three.js, please see Creating a Basic Scene in Three.js If you're confident with the basics you can download the full example files for this tutorial.   A Quick Look At the Shader If you've downloaded the example files, open scene.html and look at line 40. <script src="js/shaders/DisplacementShader.js"></script> This references our shader script, located…

Chameleon Video Player PHP Warning Fix

|WordPress|0 Comments

I noticed, after updating to the latest Wordpress version (4.1), the LambertGroup - Chameleon Video Player plugin produced the error: Warning: Missing argument 2 for wpdb::prepare() After reading this article: https://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/ I changed: $safe_sql=$wpdb->prepare( "SELECT * FROM (".$wpdb->prefix ."lbg2_videosettings) WHERE id = ".$atts['settings_id'] ); to $settings_id = $atts['settings_id']; $safe_sql=$wpdb->prepare( "SELECT * FROM (".$wpdb->prefix ."lbg2_videosettings) WHERE id = %d", $settings_id );…

Basic SEO in WordPress

|WordPress|0 Comments

Here's how to get you started doing some basic search engine optimization in WordPress. A proper setup is important to be able to be recognized by Google and seen in a relevant search. Install Wordpress SEO by Yoast Great well rounded plugin for SEO in WordPress. Search it in your WordPress plugin depository or find it here. Adjust the Settings We just need to adjust one setting after installation: Titles & Metas > check "Force rewrite titles". The reason for doing this is because I find that most themes have their own way of incorporating the site title and site tagline i…